aboutsummaryrefslogtreecommitdiff
path: root/t/t4113-apply-ending.sh
blob: d021ae84c3d64c8afe7ea563b78619ccd06214d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
#
# Copyright (c) 2006 Catalin Marinas
#

test_description='git-apply trying to add an ending line.

'
. ./test-lib.sh

# setup

cat >test-patch <<\EOF
diff --git a/file b/file
--- a/file
+++ b/file
@@ -1,2 +1,3 @@
 a
 b
+c
EOF

echo 'a' >file
echo 'b' >>file
echo 'c' >>file

test_expect_success setup \
    'git-update-index --add file'

# test

test_expect_failure apply \
    'git-apply --index test-patch'

test_done