Skip to content

Commit fdda1ac

Browse files
dschogitster
authored andcommitted
t0001 (mingw): do not expect a specific order of stdout/stderr
When redirecting stdout/stderr to the same file, we cannot guarantee that stdout will come first. In fact, in this test case, it seems that an MSVC build always prints stderr first. In any case, this test case does not want to verify the *order* but the *presence* of both outputs, so let's test exactly that. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a5bdf9f commit fdda1ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t0001-init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,8 @@ test_expect_success MINGW 'redirect std handles' '
473473
GIT_REDIRECT_STDOUT=output.txt \
474474
GIT_REDIRECT_STDERR="2>&1" \
475475
git rev-parse --git-dir --verify refs/invalid &&
476-
printf ".git\nfatal: Needed a single revision\n" >expect &&
477-
test_cmp expect output.txt
476+
grep "^\\.git\$" output.txt &&
477+
grep "Needed a single revision" output.txt
478478
'
479479

480480
test_done

0 commit comments

Comments
 (0)