diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t4252-am-options.sh | 8 | ||||
-rw-r--r-- | t/t4252/am-test-5-1 | 20 | ||||
-rw-r--r-- | t/t4252/am-test-5-2 | 15 |
3 files changed, 43 insertions, 0 deletions
diff --git a/t/t4252-am-options.sh b/t/t4252-am-options.sh index 3ab9e8e6e..e91a6da0d 100755 --- a/t/t4252-am-options.sh +++ b/t/t4252-am-options.sh @@ -50,4 +50,12 @@ 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_done diff --git a/t/t4252/am-test-5-1 b/t/t4252/am-test-5-1 new file mode 100644 index 000000000..da7bf29cb --- /dev/null +++ b/t/t4252/am-test-5-1 @@ -0,0 +1,20 @@ +From: A U Thor <au.thor@example.com> +Date: Thu Dec 4 16:00:00 2008 -0800 +Subject: Six + +Applying this patch with --directory='frotz nitfol' should fail + +diff --git i/junk/file-2 w/junk/file-2 +index 06e567b..b6f3a16 100644 +--- i/junk/file-2 ++++ w/junk/file-2 +@@ -1,7 +1,7 @@ + One + 2 +-3 ++Three + 4 + 5 +-6 ++Six + 7 diff --git a/t/t4252/am-test-5-2 b/t/t4252/am-test-5-2 new file mode 100644 index 000000000..373025bcf --- /dev/null +++ b/t/t4252/am-test-5-2 @@ -0,0 +1,15 @@ +From: A U Thor <au.thor@example.com> +Date: Thu Dec 4 16:00:00 2008 -0800 +Subject: Six + +Applying this patch with --directory='frotz nitfol' should succeed + +diff --git i/file-5 w/file-5 +new file mode 100644 +index 000000..1d6ed9f +--- /dev/null ++++ w/file-5 +@@ -0,0 +1,3 @@ ++One ++two ++three |