X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3404-rebase-interactive.sh;h=b9e3dbd242cc92710d1c689ca5412619e46ee63f;hb=4ec22a48c0575c8a303cd00b5ef4b3d703fbf8b3;hp=f09823106fa75f668291d94039746adac16b6880;hpb=aadbe44f883859536c5320e0ac1d6ed122c45671;p=git.git diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index f09823106..b9e3dbd24 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -91,9 +91,8 @@ for line in $FAKE_LINES; do done EOF +test_set_editor "$(pwd)/fake-editor.sh" chmod a+x fake-editor.sh -VISUAL="$(pwd)/fake-editor.sh" -export VISUAL test_expect_success 'no changes are a nop' ' git rebase -i F && @@ -122,8 +121,8 @@ test_expect_success 'reflog for the branch shows state before rebase' ' test_expect_success 'exchange two commits' ' FAKE_LINES="2 1" git rebase -i HEAD~2 && - test H = $(git cat-file commit HEAD^ | tail -n 1) && - test G = $(git cat-file commit HEAD | tail -n 1) + test H = $(git cat-file commit HEAD^ | sed -ne \$p) && + test G = $(git cat-file commit HEAD | sed -ne \$p) ' cat > expect << EOF @@ -146,8 +145,8 @@ EOF test_expect_success 'stop on conflicting pick' ' git tag new-branch1 && ! git rebase -i master && - diff -u expect .git/.dotest-merge/patch && - diff -u expect2 file1 && + test_cmp expect .git/.dotest-merge/patch && + test_cmp expect2 file1 && test 4 = $(grep -v "^#" < .git/.dotest-merge/done | wc -l) && test 0 = $(grep -c "^[^#]" < .git/.dotest-merge/git-rebase-todo) '