Code

Merge branch 'kb/am-directory'
[git.git] / t / t4252-am-options.sh
index 1a1946dd97659a6e8c3c70075721391ee7490938..5fdd1885820927f32822019ccde52e6b783e31eb 100755 (executable)
@@ -45,10 +45,25 @@ test_expect_success 'interrupted am -C1 -p2' '
        rm -rf .git/rebase-apply &&
        git reset --hard initial &&
        test_must_fail git am -p2 -C1 "$tm"/am-test-4-? &&
-       cat .git/rebase-apply/apply_opt_extra &&
        git am --skip &&
        grep 3 file-1 &&
        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_done