From: SZEDER Gábor Date: Tue, 27 Aug 2019 08:11:04 GMT Subject: Re: [PATCH v10 4/9] t3432: test for --no-ff's interaction with fast-forward Message-ID: <20190827081104.GT20404@szeder.dev> In-Reply-To: <48b4e41a17d98b2f3a4254ed37c76361c3abc9ba.1566884063.git.liu.denton@gmail.com> On Tue, Aug 27, 2019 at 01:37:53AM -0400, Denton Liu wrote: > From: Ævar Arnfjörð Bjarmason > + 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.