summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2011-08-28 07:34:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-29 05:19:27 (GMT)
commit385ceec1cb46f8a476fa11ffc853dedba512fd52 (patch)
tree9fc9f4c79d14c2c30e560430a4483dffa54546f4 /t
parent0f64bfa9567f697d6152ef9ea937d4b573029a08 (diff)
downloadgit-385ceec1cb46f8a476fa11ffc853dedba512fd52.zip
git-385ceec1cb46f8a476fa11ffc853dedba512fd52.tar.gz
git-385ceec1cb46f8a476fa11ffc853dedba512fd52.tar.bz2
t3005: do not assume a particular order of stdout and stderr of git-ls-files
There is no guarantee that stderr is flushed before stdout when both channels are redirected to a file. Check the channels using independent files. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t3005-ls-files-relative.sh22
1 files changed, 12 insertions, 10 deletions
diff --git a/t/t3005-ls-files-relative.sh b/t/t3005-ls-files-relative.sh
index a2b63e2..3778694 100755
--- a/t/t3005-ls-files-relative.sh
+++ b/t/t3005-ls-files-relative.sh
@@ -45,11 +45,12 @@ test_expect_success 'ls-files -c' '
for f in ../y*
do
echo "error: pathspec $sq$f$sq did not match any file(s) known to git."
- done >expect &&
- echo "Did you forget to ${sq}git add${sq}?" >>expect &&
- ls ../x* >>expect &&
- test_must_fail git ls-files -c --error-unmatch ../[xy]* >actual 2>&1 &&
- test_cmp expect actual
+ done >expect.err &&
+ echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
+ ls ../x* >expect.out &&
+ test_must_fail git ls-files -c --error-unmatch ../[xy]* >actual.out 2>actual.err &&
+ test_cmp expect.out actual.out &&
+ test_cmp expect.err actual.err
)
'
@@ -59,11 +60,12 @@ test_expect_success 'ls-files -o' '
for f in ../x*
do
echo "error: pathspec $sq$f$sq did not match any file(s) known to git."
- done >expect &&
- echo "Did you forget to ${sq}git add${sq}?" >>expect &&
- ls ../y* >>expect &&
- test_must_fail git ls-files -o --error-unmatch ../[xy]* >actual 2>&1 &&
- test_cmp expect actual
+ done >expect.err &&
+ echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
+ ls ../y* >expect.out &&
+ test_must_fail git ls-files -o --error-unmatch ../[xy]* >actual.out 2>actual.err &&
+ test_cmp expect.out actual.out &&
+ test_cmp expect.err actual.err
)
'