Re: [PATCH 03/18] t5613: use test_must_fail
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Oct 4, 2016, 05:51 UTC
- Message-ID
- <CA+P7+xqnSt5qe4OLi2kDO9+y_keyFtVK2=qx4Q5skusBWXD31Q@mail.gmail.com>
- In-Reply-To
- <20161003203401.d4awnljukgqbku2n@sigill.intra.peff.net>
On Mon, Oct 3, 2016 at 1:34 PM, Jeff King <peff@peff.net> wrote:
> Besides being our normal style, this correctly checks for an > error exit() versus signal death. >
Another very simple but obvious improvement.
Regards, Jake
Show 45 quoted lines
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> t/t5613-info-alternate.sh | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/t/t5613-info-alternate.sh b/t/t5613-info-alternate.sh
> index 4548fb0..65074dd 100755
> --- a/t/t5613-info-alternate.sh
> +++ b/t/t5613-info-alternate.sh
> @@ -46,10 +46,9 @@ git clone -l -s F G &&
> git clone --bare -l -s G H'
>
> test_expect_success 'invalidity of deepest repository' \
> -'cd H && {
> - git fsck
> - test $? -ne 0
> -}'
> +'cd H &&
> +test_must_fail git fsck
> +'
>
> cd "$base_dir"
>
> @@ -75,7 +74,8 @@ cd "$base_dir"
> test_expect_success 'that info/alternates is necessary' \
> 'cd C &&
> rm -f .git/objects/info/alternates &&
> -! (git fsck)'
> +test_must_fail git fsck
> +'
>
> cd "$base_dir"
>
> @@ -89,7 +89,7 @@ cd "$base_dir"
> test_expect_success \
> 'that relative alternate is only possible for current dir' '
> cd D &&
> - ! (git fsck)
> + test_must_fail git fsck
> '
>
> cd "$base_dir"
> --
> 2.10.0.618.g82cc264
>