summaryrefslogtreecommitdiff
path: root/t/t3904-stash-patch.sh
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2015-04-16 07:02:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-04-16 21:14:12 (GMT)
commit7e9e048661477ad17f57a7153eaaec490660e767 (patch)
tree0ae1463f2be48fe193b1e6b1aee9a051588279f7 /t/t3904-stash-patch.sh
parent798a5b03fb89f6cb5d46db42beac02886223dfd3 (diff)
downloadgit-7e9e048661477ad17f57a7153eaaec490660e767.zip
git-7e9e048661477ad17f57a7153eaaec490660e767.tar.gz
git-7e9e048661477ad17f57a7153eaaec490660e767.tar.bz2
stash -p: demonstrate failure of split with mixed y/n
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3904-stash-patch.sh')
-rwxr-xr-xt/t3904-stash-patch.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t3904-stash-patch.sh b/t/t3904-stash-patch.sh
index 0f8f47f..38e7300 100755
--- a/t/t3904-stash-patch.sh
+++ b/t/t3904-stash-patch.sh
@@ -81,4 +81,27 @@ test_expect_success 'none of this moved HEAD' '
verify_saved_head
'
+test_expect_failure 'stash -p with split hunk' '
+ git reset --hard &&
+ cat >test <<-\EOF &&
+ aaa
+ bbb
+ ccc
+ EOF
+ git add test &&
+ git commit -m "initial" &&
+ cat >test <<-\EOF &&
+ aaa
+ added line 1
+ bbb
+ added line 2
+ ccc
+ EOF
+ printf "%s\n" s n y q |
+ test_might_fail git stash -p 2>error &&
+ ! test_must_be_empty error &&
+ grep "added line 1" test &&
+ ! grep "added line 2" test
+'
+
test_done