grep: break down an "if" stmt in preparation for next changes
[gitweb.git] / t / t3404-rebase-interactive.sh
index 98eb49ac236e9e9d08d5da5167f7e257db173c41..544f9ad50831e29095a9f143bf414e08fed46d9e 100755 (executable)
@@ -1006,6 +1006,22 @@ test_expect_success 'rebase -i with --strategy and -X' '
        test $(cat file1) = Z
 '
 
+test_expect_success 'interrupted rebase -i with --strategy and -X' '
+       git checkout -b conflict-merge-use-theirs-interrupted conflict-branch &&
+       git reset --hard HEAD^ &&
+       >breakpoint &&
+       git add breakpoint &&
+       git commit -m "breakpoint for interactive mode" &&
+       echo five >conflict &&
+       echo Z >file1 &&
+       git commit -a -m "one file conflict" &&
+       set_fake_editor &&
+       FAKE_LINES="edit 1 2" git rebase -i --strategy=recursive -Xours conflict-branch &&
+       git rebase --continue &&
+       test $(git show conflict-branch:conflict) = $(cat conflict) &&
+       test $(cat file1) = Z
+'
+
 test_expect_success 'rebase -i error on commits with \ in message' '
        current_head=$(git rev-parse HEAD) &&
        test_when_finished "git rebase --abort; git reset --hard $current_head; rm -f error" &&
@@ -1234,7 +1250,7 @@ test_expect_success 'tabs and spaces are accepted in the todolist' '
                # Turn single spaces into space/tab mix
                sed "1s/ /      /g; 2s/ /  /g; 3s/ /    /g" "$1"
                printf "\n\t# comment\n #more\n\t # comment\n"
-       ) >$1.new
+       ) >"$1.new"
        mv "$1.new" "$1"
        EOF
        test_set_editor "$(pwd)/add-indent.sh" &&