Skip to content

Commit a9ae8fd

Browse files
newrengitster
authored andcommitted
t3404: directly test the behavior of interest
t3404.3 is a simple test added by commit d078c39 ("t3404: todo list with commented-out commands only aborts", 2018-08-10) which was designed to test a todo list that only contained commented-out commands. There were two problems with this test: (1) its title did not reflect the purpose of the test, and (2) it tested the desired behavior through a side-effect of other functionality instead of directly testing the desired behavior discussed in the commit message. Modify the test to directly test the desired behavior and update the test title. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 22a69fd commit a9ae8fd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

t/t3404-rebase-interactive.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,16 @@ test_expect_success 'rebase --keep-empty' '
7272
test_line_count = 6 actual
7373
'
7474

75-
test_expect_success 'rebase -i with empty HEAD' '
75+
test_expect_success 'rebase -i with empty todo list' '
7676
cat >expect <<-\EOF &&
7777
error: nothing to do
7878
EOF
7979
(
8080
set_fake_editor &&
81-
test_must_fail env FAKE_LINES="1 exec_true" \
82-
git rebase -i HEAD^ >actual 2>&1
81+
test_must_fail env FAKE_LINES="#" \
82+
git rebase -i HEAD^ >output 2>&1
8383
) &&
84+
tail -n 1 output >actual && # Ignore output about changing todo list
8485
test_i18ncmp expect actual
8586
'
8687

0 commit comments

Comments
 (0)