summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-06-19 21:05:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-20 21:03:05 (GMT)
commitfdda1ac62d7b2adba3d443ab8051a6accfe160df (patch)
tree19bc3b9a841c9f3fc042e6d726ba205f51081e8e
parenta5bdf9fdf1f6fe566f206097df321f28fe1593e3 (diff)
downloadgit-fdda1ac62d7b2adba3d443ab8051a6accfe160df.zip
git-fdda1ac62d7b2adba3d443ab8051a6accfe160df.tar.gz
git-fdda1ac62d7b2adba3d443ab8051a6accfe160df.tar.bz2
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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t0001-init.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 0276d14..1f759b0 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -473,8 +473,8 @@ test_expect_success MINGW 'redirect std handles' '
GIT_REDIRECT_STDOUT=output.txt \
GIT_REDIRECT_STDERR="2>&1" \
git rev-parse --git-dir --verify refs/invalid &&
- printf ".git\nfatal: Needed a single revision\n" >expect &&
- test_cmp expect output.txt
+ grep "^\\.git\$" output.txt &&
+ grep "Needed a single revision" output.txt
'
test_done