Re: [PATCHv4 02/15] t4017 (diff-retval): replace manual exit code check with test_expect_code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Elijah Newren <newren@xxxxxxxxx> writes:

> Acked-by: Ãvar ArnfjÃrà Bjarmason <avarab@xxxxxxxxx>
> Signed-off-by: Elijah Newren <newren@xxxxxxxxx>
> ---
>  t/t4017-diff-retval.sh |   30 ++++++++++--------------------
>  1 files changed, 10 insertions(+), 20 deletions(-)
>
> diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh
> index 6158985..6605e12 100755
> --- a/t/t4017-diff-retval.sh
> +++ b/t/t4017-diff-retval.sh
> @@ -28,37 +28,29 @@ test_expect_success 'git diff --quiet -w  HEAD^ HEAD' '
>  	test_must_fail git diff --quiet -w HEAD^ HEAD
>  '
>  
> -test_expect_success 'git diff-tree HEAD^ HEAD' '
> +test_expect_code 1 'git diff-tree HEAD^ HEAD' '
>  	git diff-tree --exit-code HEAD^ HEAD
> -	test $? = 1
>  '
> -test_expect_success 'git diff-tree HEAD^ HEAD -- a' '
> +test_expect_code 0 'git diff-tree HEAD^ HEAD -- a' '
>  	git diff-tree --exit-code HEAD^ HEAD -- a
> -	test $? = 0
>  '

It probably is better to simply drop "test $? = 0" and keep the
expect-success, no?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]