X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4252-am-options.sh;h=f603c1b1336c4a00889177376d9b51077c9cc2ac;hb=9a62d72dfa833f98dd0730b3d5136f56d637a5c3;hp=3ab9e8e6e3635ce54b19cec7987ab976fd994309;hpb=a9ed6ce0e7057b94809d3c51094ba96fe96fded8;p=git.git diff --git a/t/t4252-am-options.sh b/t/t4252-am-options.sh index 3ab9e8e6e..f603c1b13 100755 --- a/t/t4252-am-options.sh +++ b/t/t4252-am-options.sh @@ -1,6 +1,6 @@ #!/bin/sh -test_description='git am not losing options' +test_description='git am with options and not losing them' . ./test-lib.sh tm="$TEST_DIRECTORY/t4252" @@ -50,4 +50,29 @@ test_expect_success 'interrupted am -C1 -p2' ' grep "^Three$" file-2 ' +test_expect_success 'interrupted am --directory="frotz nitfol"' ' + rm -rf .git/rebase-apply && + git reset --hard initial && + test_must_fail git am --directory="frotz nitfol" "$tm"/am-test-5-? && + git am --skip && + grep One "frotz nitfol/file-5" +' + +test_expect_success 'apply to a funny path' ' + with_sq="with'\''sq" + rm -fr .git/rebase-apply && + git reset --hard initial && + git am --directory="$with_sq" "$tm"/am-test-5-2 && + test -f "$with_sq/file-5" +' + +test_expect_success 'am --reject' ' + rm -rf .git/rebase-apply && + git reset --hard initial && + test_must_fail git am --reject "$tm"/am-test-6-1 && + grep "@@ -1,3 +1,3 @@" file-2.rej && + test_must_fail git diff-files --exit-code --quiet file-2 && + grep "[-]-reject" .git/rebase-apply/apply-opt +' + test_done