Re: [PATCH en/cascade-tests] tests: add missing &&

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

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> @@ -27,7 +27,7 @@ test_expect_success 'see what we expect' '
>  	>junk/"$auml" &&
>  	case "$(cd junk && echo *)" in
>  	"$aumlcdiar")
> -		test_unicode=test_expect_failure
> +		test_unicode=test_expect_failure &&
>  		unibad=t
>  		;;
>  	*)	;;

This seems to prepare for a case where a simple variable assignment fails
for whategver reason, which is not too bad, but ...

> @@ -36,7 +36,7 @@ test_expect_success 'see what we expect' '
>  	{
>  		ln -s x y 2> /dev/null &&
>  		test -h y 2> /dev/null ||
> -		no_symlinks=1
> +		no_symlinks=1 &&
>  		rm -f y

... if you allowed such a simple assignment failure, no_symlinks=1 may
fail, and we end up not running "rm -f y" to clean up, which might be
somewhat undesirable ;-)

Looked up to but not including t5302 and all looked Ok.
--
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]