summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAndrew Wong <andrew.kw.w@gmail.com>2012-09-18 01:28:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-18 03:59:18 (GMT)
commit9f4981bac6f492d332785b8ed03f33a167952f38 (patch)
tree0c09dc1fc14ef72d9e5f9b881f36dc5acd63f9dd /t
parenteb9a7cb4bdbd4ea9c7e7ef2ca8de5b2753e3584c (diff)
downloadgit-9f4981bac6f492d332785b8ed03f33a167952f38.zip
git-9f4981bac6f492d332785b8ed03f33a167952f38.tar.gz
git-9f4981bac6f492d332785b8ed03f33a167952f38.tar.bz2
rebase -i: Add tests for "--edit-todo"
Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t3404-rebase-interactive.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 7304b66..6eafb63 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -911,4 +911,22 @@ test_expect_success 'rebase -i --root fixup root commit' '
test 0 = $(git cat-file commit HEAD | grep -c ^parent\ )
'
+test_expect_success 'rebase --edit-todo does not works on non-interactive rebase' '
+ git reset --hard &&
+ git checkout conflict-branch &&
+ test_must_fail git rebase --onto HEAD~2 HEAD~ &&
+ test_must_fail git rebase --edit-todo &&
+ git rebase --abort
+'
+
+test_expect_success 'rebase --edit-todo can be used to modify todo' '
+ git reset --hard &&
+ git checkout no-conflict-branch^0 &&
+ FAKE_LINES="edit 1 2 3" git rebase -i HEAD~3 &&
+ FAKE_LINES="2 1" git rebase --edit-todo &&
+ git rebase --continue
+ test M = $(git cat-file commit HEAD^ | sed -ne \$p) &&
+ test L = $(git cat-file commit HEAD | sed -ne \$p)
+'
+
test_done