]>
Commit | Line | Data |
---|---|---|
8b64647d JH |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2005 Junio C Hamano | |
4 | # | |
5 | ||
5be60078 | 6 | test_description='git apply should handle files with incomplete lines. |
8b64647d JH |
7 | |
8 | ' | |
9 | . ./test-lib.sh | |
10 | ||
11 | # setup | |
12 | ||
13 | (echo a; echo b) >frotz.0 | |
14 | (echo a; echo b; echo c) >frotz.1 | |
15 | (echo a; echo b | tr -d '\012') >frotz.2 | |
16 | (echo a; echo c; echo b | tr -d '\012') >frotz.3 | |
17 | ||
18 | for i in 0 1 2 3 | |
19 | do | |
20 | for j in 0 1 2 3 | |
21 | do | |
22 | test $i -eq $j && continue | |
8b64647d | 23 | cat frotz.$i >frotz |
bfdbee98 JH |
24 | test_expect_success "apply diff between $i and $j" ' |
25 | git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j && | |
26 | test_cmp frotz.$j frotz | |
27 | ' | |
8b64647d JH |
28 | done |
29 | done | |
da7bc9b0 PR |
30 | |
31 | test_done |