From: Johannes Sixt Date: Wed, 19 Jun 2019 06:19:18 GMT Subject: Re: [PATCH 02/17] t0001 (mingw): do not expect a specific order of stdout/stderr Message-ID: <40cfbb30-c632-54da-62d9-9b31bc878806@kdbg.org> In-Reply-To: Am 19.06.19 um 01:12 schrieb Eric Sunshine: > On Tue, Jun 18, 2019 at 8:24 AM Johannes Schindelin via GitGitGadget > wrote: >> diff --git a/t/t0001-init.sh b/t/t0001-init.sh >> @@ -474,7 +474,8 @@ test_expect_success MINGW 'redirect std handles' ' >> printf ".git\nfatal: Needed a single revision\n" >expect && >> - test_cmp expect output.txt >> + sort output.sorted && >> + test_cmp expect output.sorted > > It was quite surprising to see this sorting only 'output' but not > 'expect'. I see now that 'output' is already "sorted" (in that sense), > but it feels fragile. More robust would be to sort 'expect' as well: > > printf ".git\nfatal: Needed a single revision\n" | sort >expect && Following Dscho's recent objection elsewhere that tests tend to check for much more than regressions, wouldn't it be logical to write these as grep -F .git" output.txt && test_i18n_grep "Needed a single rev" output.txt without an 'expect' file at all? -- Hannes