mirror of
https://github.com/git/git
synced 2024-10-28 19:25:47 +00:00
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>
This commit is contained in:
parent
798a5b03fb
commit
7e9e048661
1 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue