Re: [PATCH 13/15] t3030 (merge-recursive): use test_expect_code

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

 



Patches 9-12 look good.

Ramkumar Ramachandra wrote:

> Use test_expect_code in preference to repeatedly checking exit codes
> by hand.
[...]
> +++ b/t/t3030-merge-recursive.sh
> @@ -285,17 +285,7 @@ test_expect_success 'merge-recursive simple' '
>  	rm -fr [abcd] &&
>  	git checkout -f "$c2" &&
>  
> -	git merge-recursive "$c0" -- "$c2" "$c1"
> -	status=$?
> -	case "$status" in
> -	1)
> -		: happy
> -		;;
> -	*)
> -		echo >&2 "why status $status!!!"
> -		false
> -		;;
> -	esac
> +	test_expect_code 1 git merge-recursive "$c0" -- "$c2" "$c1"

Yeah, this style is kind of repetitive.  Worse, if "git checkout"
fails with status 1, it would yield a false success.  Thanks for
fixing it.
--
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]