Re: [PATCH] filter-branch tests/docs: avoid \t in sed regexes

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

 



On 7/29/10 4:52 PM, Thomas Rast wrote:
> Tomas Carnecky wrote:
>> *** t7003-filter-branch.sh ***
>> *   ok 17: use index-filter to move into a subdirectory
> 
> Oh, I know.  The test isn't correct, it should be something like the
> patch below.  Otherwise a failure in git-diff (namely that
> directorymoved:newsubdir is invalid) is never detected, and since the
> output in this case is empty, also the test -z succeeds.  Can you
> apply that and see if it makes the test fail for you?
> 
> diff --git i/t/t7003-filter-branch.sh w/t/t7003-filter-branch.sh
> index e90da6d..a8e0c48 100755
> --- i/t/t7003-filter-branch.sh
> +++ w/t/t7003-filter-branch.sh
> @@ -148,7 +148,9 @@ test_expect_success 'use index-filter to move into a subdirectory' '
>  	          GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
>  			git update-index --index-info &&
>  		  mv \"\$GIT_INDEX_FILE.new\" \"\$GIT_INDEX_FILE\"" directorymoved &&
> -	test -z "$(git diff HEAD directorymoved:newsubdir)"'
> +	git diff HEAD directorymoved:newsubdir > actual &&
> +	test ! -s actual
> +'
>  
>  test_expect_success 'stops when msg filter fails' '
>  	old=$(git rev-parse HEAD) &&

Now the test fails. And with the other patch applied on top of it, the
test passes again.

tom

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