Thread (80 messages) 80 messages, 5 authors, 2019-06-25
STALE2555d

[PATCH 02/17] t0001 (mingw): do not expect a specific order of stdout/stderr

From: Johannes Schindelin via GitGitGadget <hidden>
Date: 2019-06-18 12:24:05
Subsystem: the rest · Maintainer: Linus Torvalds

From: Johannes Schindelin <redacted>

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 relax the test a little.

Signed-off-by: Johannes Schindelin <redacted>
---
 t/t0001-init.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 77a224aafb..c7ab18f40f 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -474,7 +474,8 @@ test_expect_success MINGW 'redirect std handles' '
 		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
+	sort <output.txt >output.sorted &&
+	test_cmp expect output.sorted
 '
 
 test_done
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help