Re: [PATCH] Convert "! git" to "test_must_fail" git.

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

 



Are you sure these are working properly?  If I recall
correctly, test_must_fail does not act the same as '!'
when a '|' is involved.  I believe the '!' negates the
result of the entire statement, but test_must_fail only
operates on the arguments preceding the '|'.

The rest looks good, and I'm surprised there were so many.

On 07/20/2010 02:09 PM, Jared Hance wrote:
> diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
> index 8a63227..b20edff 100755
> --- a/t/t7810-grep.sh
> +++ b/t/t7810-grep.sh

> @@ -134,7 +134,7 @@ do
>  	'
>  
>  	test_expect_success "grep -c $L (no /dev/null)" '
> -		! git grep -c test $H | grep /dev/null
> +		test_must_fail git grep -c test $H | grep /dev/null
>          '
>  
>  	test_expect_success "grep --max-depth -1 $L" '
> diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
> index 13766ab..9e86e9f 100755
> --- a/t/t9100-git-svn-basic.sh
> +++ b/t/t9100-git-svn-basic.sh
> @@ -245,7 +245,7 @@ test_expect_success 'dcommit $rev does not clobber current branch' '
>  	test $old_head = $(git rev-parse HEAD) &&
>  	test refs/heads/my-bar = $(git symbolic-ref HEAD) &&
>  	git log refs/remotes/bar | grep "change 1" &&
> -	! git log refs/remotes/bar | grep "change 2" &&
> +	test_must_fail git log refs/remotes/bar | grep "change 2" &&
>  	git checkout master &&
>  	git branch -D my-bar
>  	'
--
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]