d021ae84c3d64c8afe7ea563b78619ccd06214d7
1#!/bin/sh
2#
3# Copyright (c) 2006 Catalin Marinas
4#
5
6test_description='git-apply trying to add an ending line.
7
8'
9. ./test-lib.sh
10
11# setup
12
13cat >test-patch <<\EOF
14diff --git a/file b/file
15--- a/file
16+++ b/file
17@@ -1,2 +1,3 @@
18 a
19 b
20+c
21EOF
22
23echo 'a' >file
24echo 'b' >>file
25echo 'c' >>file
26
27test_expect_success setup \
28 'git-update-index --add file'
29
30# test
31
32test_expect_failure apply \
33 'git-apply --index test-patch'
34
35test_done