summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2010-07-22 08:13:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-07-26 06:14:18 (GMT)
commitc1e02b2b383a6cd29353067c942384028745314c (patch)
treec46a8d0975253bf97c5e7c670d3d891a21e6577e /t
parent938791cd01bfb9729feed95a12f743fd077d0467 (diff)
downloadgit-c1e02b2b383a6cd29353067c942384028745314c.zip
git-c1e02b2b383a6cd29353067c942384028745314c.tar.gz
git-c1e02b2b383a6cd29353067c942384028745314c.tar.bz2
t3700-add: fix dependence on stdout and stderr buffering
One test case checked the stdout and stderr of 'git add' by constructing a single 'expect' file that contained both streams. But when the command runs, the order of stdout and stderr output is unpredictable because it depends on how the streams are buffered. At least on Windows, the buffering is different from what the test case expected. Hence, check the two output texts separately. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Acked-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t3700-add.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index d03495d..7d7140d 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -272,17 +272,20 @@ test_expect_success 'git add --dry-run of non-existing file' "
echo \"fatal: pathspec 'ignored-file' did not match any files\" | test_cmp - actual
"
-cat >expect <<EOF
+cat >expect.err <<\EOF
The following paths are ignored by one of your .gitignore files:
ignored-file
Use -f if you really want to add them.
fatal: no files added
+EOF
+cat >expect.out <<\EOF
add 'track-this'
EOF
test_expect_success 'git add --dry-run --ignore-missing of non-existing file' '
- test_must_fail git add --dry-run --ignore-missing track-this ignored-file >actual 2>&1 &&
- test_cmp expect actual
+ test_must_fail git add --dry-run --ignore-missing track-this ignored-file >actual.out 2>actual.err &&
+ test_cmp expect.out actual.out &&
+ test_cmp expect.err actual.err
'
test_done