From: Junio C Hamano Date: Sun, 21 Mar 2021 21:33:45 GMT Subject: Re: [PATCH 1/2] diff --no-index tests: add test for --exit-code Message-ID: In-Reply-To: <29da572f-8d94-000e-ffc0-fded4b56d3c3@ramsayjones.plus.com> Ramsay Jones writes: > On 21/03/2021 12:39, Ævar Arnfjörð Bjarmason wrote: >> Add a test for --exit-code working with --no-index. There's no reason >> to suppose it wouldn't, but we weren't testing for it anywhere in our >> tests. Let's fix that blind spot. >> >> Signed-off-by: Ævar Arnfjörð Bjarmason >> --- >> t/t4053-diff-no-index.sh | 7 ++++++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/t/t4053-diff-no-index.sh b/t/t4053-diff-no-index.sh >> index 0168946b639..9b7a8ebfd3f 100755 >> --- a/t/t4053-diff-no-index.sh >> +++ b/t/t4053-diff-no-index.sh >> @@ -16,7 +16,12 @@ test_expect_success 'setup' ' >> echo 1 >non/git/b >> ' >> >> -test_expect_success 'git diff --no-index directories' ' >> +test_expect_success 'git diff --no-index --exit-code' ' >> + git diff --no-index --exit-code a/1 non/git/a && >> + test_expect_code 1 git diff --no-index --exit-code a/1 a/2 >> +' >> + >> +Test_expect_success 'git diff --no-index directories' ' > > I assume that s/test/Test/ was not intended. ;-) ;-) Love to see reviewers are more careful than submitters' shells that are too lenient to allow such a test to pass before such a patch gets submitted.