summaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-01-16 06:14:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-01-17 21:58:30 (GMT)
commita9ae8fde2eb0c00723d850ba23ea8401864fab83 (patch)
tree60368fbeed21ea902113adb7b922978af52c3604 /t/t3404-rebase-interactive.sh
parent22a69fda197f78410190469bf0fcb51f6f69730f (diff)
downloadgit-a9ae8fde2eb0c00723d850ba23ea8401864fab83.zip
git-a9ae8fde2eb0c00723d850ba23ea8401864fab83.tar.gz
git-a9ae8fde2eb0c00723d850ba23ea8401864fab83.tar.bz2
t3404: directly test the behavior of interest
t3404.3 is a simple test added by commit d078c3910689 ("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 <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index ae6e55c..c41531f 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -72,15 +72,16 @@ test_expect_success 'rebase --keep-empty' '
test_line_count = 6 actual
'
-test_expect_success 'rebase -i with empty HEAD' '
+test_expect_success 'rebase -i with empty todo list' '
cat >expect <<-\EOF &&
error: nothing to do
EOF
(
set_fake_editor &&
- test_must_fail env FAKE_LINES="1 exec_true" \
- git rebase -i HEAD^ >actual 2>&1
+ test_must_fail env FAKE_LINES="#" \
+ git rebase -i HEAD^ >output 2>&1
) &&
+ tail -n 1 output >actual && # Ignore output about changing todo list
test_i18ncmp expect actual
'