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

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

 



On 07/20/2010 02:48 PM, Jonathan Nieder wrote:
> Brandon Casey wrote:
> 
>> I believe the '!' negates the
>> result of the entire statement, but test_must_fail only
>> operates on the arguments preceding the '|'.
> 
> Right.  For example:
> 
>> On 07/20/2010 02:09 PM, Jared Hance wrote:
> 
> [...]
>>> +++ 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
> 
> should be
> 
> 	git grep -c test $H | ! grep /dev/null

I seem to recall that that doesn't work either.

   $ /bin/bash -c 'echo foo | ! grep bar && echo success || echo failure'
   /bin/bash: -c: line 0: syntax error near unexpected token `!'
   /bin/bash: -c: line 0: `echo foo | ! grep bar && echo success || echo failure'

-brandon

--
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]