summaryrefslogtreecommitdiff
path: root/t/t6018-rev-list-glob.sh
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2018-08-22 17:48:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-22 18:02:07 (GMT)
commitb89b4a660cecc5555d48c9603b799f7393f23505 (patch)
tree945d643014e93c9f74f38c0ee87ad82b9c830554 /t/t6018-rev-list-glob.sh
parentd3c6751b18170276f80e3578d16877d43ad22709 (diff)
downloadgit-b89b4a660cecc5555d48c9603b799f7393f23505.zip
git-b89b4a660cecc5555d48c9603b799f7393f23505.tar.gz
git-b89b4a660cecc5555d48c9603b799f7393f23505.tar.bz2
t6018-rev-list-glob: fix 'empty stdin' test
Prior to d3c6751b18 (tests: make use of the test_must_be_empty function, 2018-07-27), in the test 'rev-list should succeed with empty output on empty stdin' in 't6018-rev-list-glob' the empty 'expect' file served dual purpose: besides specifying the expected output, as usual, it also served as empty input for 'git rev-list --stdin'. Then d3c6751b18 came along, and, as part of the conversion to 'test_must_be_empty', removed this empty 'expect' file, not realizing its secondary purpose. Redirecting stdin from the now non-existing file failed the test, but since this test expects failure in the first place, this issue went unnoticed. Redirect 'git rev-list's stdin explicitly from /dev/null to provide empty input. (Strictly speaking we don't need this redirection, because the test script's stdin is already redirected from /dev/null anyway, but I think it's better to be explicit about it.) Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6018-rev-list-glob.sh')
-rwxr-xr-xt/t6018-rev-list-glob.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh
index 02936c2..0bf10d0 100755
--- a/t/t6018-rev-list-glob.sh
+++ b/t/t6018-rev-list-glob.sh
@@ -256,7 +256,7 @@ test_expect_success 'rev-list accumulates multiple --exclude' '
'
test_expect_failure 'rev-list should succeed with empty output on empty stdin' '
- git rev-list --stdin <expect >actual &&
+ git rev-list --stdin </dev/null >actual &&
test_must_be_empty actual
'