mergetool: Fix typo in options passed to kdiff3
[git/mergetool.git] / t / t4123-apply-shrink.sh
blob984157f03b9744aa491c888fab9e6aef95dfdc6b
1 #!/bin/sh
3 test_description='apply a patch that is larger than the preimage'
5 . ./test-lib.sh
7 cat >F <<\EOF
16 999999
28 EOF
30 test_expect_success setup '
32 git add F &&
33 mv F G &&
34 sed -e "s/1/11/" -e "s/999999/9/" -e "s/H/HH/" <G >F &&
35 git diff >patch &&
36 sed -e "/^\$/d" <G >F &&
37 git add F
41 test_expect_success 'apply should fail gracefully' '
43 if git apply --index patch
44 then
45 echo Oops, should not have succeeded
46 false
47 else
48 status=$?
49 echo "Status was $status"
50 if test -f .git/index.lock
51 then
52 echo Oops, should not have crashed
53 false
58 test_done