Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t0001 (mingw): do not expect a specific order of stdout/stderr
author
Johannes Schindelin
<johannes.schindelin@gmx.de>
Wed, 19 Jun 2019 21:05:57 +0000
(14:05 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 20 Jun 2019 21:03:05 +0000
(14:03 -0700)
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>
t/t0001-init.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
a5bdf9f
)
diff --git
a/t/t0001-init.sh
b/t/t0001-init.sh
index 0276d14a0ba66d4af6ad7af14c6b7e98305a1b84..1f759b08f2010e968e3f35b86594f9bcd31f8a8b 100755
(executable)
--- 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 &&
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" >expec
t &&
-
test_cmp expect
output.txt
+
grep "^\\.git\$" output.tx
t &&
+
grep "Needed a single revision"
output.txt
'
test_done
'
test_done