Skip to content

Commit b89b4a6

Browse files
szedergitster
authored andcommitted
t6018-rev-list-glob: fix 'empty stdin' test
Prior to d3c6751 (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 d3c6751 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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d3c6751 commit b89b4a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t6018-rev-list-glob.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ test_expect_success 'rev-list accumulates multiple --exclude' '
256256
'
257257

258258
test_expect_failure 'rev-list should succeed with empty output on empty stdin' '
259-
git rev-list --stdin <expect >actual &&
259+
git rev-list --stdin </dev/null >actual &&
260260
test_must_be_empty actual
261261
'
262262

0 commit comments

Comments
 (0)