Subject: Re: [PATCH v10 4/9] t3432: test for --no-ff's interaction with fast-forward

From: SZEDER Gábor <[email-masked]>
Date: Tue, 27 Aug 2019 10:11:04 +0200

On Tue, Aug 27, 2019 at 01:37:53AM -0400, Denton Liu wrote:
> From: Ævar Arnfjörð Bjarmason <[email-masked]>

> +	test_expect_$status "git rebase$flag $* with $changes is $what with $cmp HEAD" "
>  		oldhead=\$(git rev-parse HEAD) &&
>  		test_when_finished 'git reset --hard \$oldhead' &&
> -		git rebase $* >stdout &&
> +		git rebase$flag $* >stdout &&
>  		if test $what = work
>  		then
> +			# Must check this case first, for 'is up to
> +			# date, rebase forced[...]rewinding head' cases
>  			test_i18ngrep 'rewinding head' stdout
>  		elif test $what = noop
>  		then
> -			test_i18ngrep 'is up to date' stdout
> +			test_i18ngrep 'is up to date' stdout &&
> +			! test_i18ngrep 'rebase forced' stdout

This must be written as 'test_i18ngrep ! ....'.  When running the test
with GIT_TEST_GETTEXT_POISON=true, then 'test_i18ngrep' is basically a
noop and always returns with success, the leading ! turns that into a
failure, which then fails the test.