X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4252-am-options.sh;h=f603c1b1336c4a00889177376d9b51077c9cc2ac;hb=fa5bc8abb35e34f673c41cb5c66d0a2f21536861;hp=e91a6da0d50e432ea964b73285923f63f9965f48;hpb=b47dfe9e9c86be97fc07c4c04e26a303730f76c6;p=git.git diff --git a/t/t4252-am-options.sh b/t/t4252-am-options.sh index e91a6da0d..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" @@ -58,4 +58,21 @@ test_expect_success 'interrupted am --directory="frotz nitfol"' ' 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