Documentation updates.
[git/jnareb-git/bp-gitweb.git] / t / t4101-apply-nonl.sh
blob26b131d0d5567a05e4ce7f386a06147e7b64fd88
1 #!/bin/sh
3 # Copyright (c) 2005 Junio C Hamano
6 test_description='git-apply should handle files with incomplete lines.
9 . ./test-lib.sh
11 # setup
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
18 for i in 0 1 2 3
20 for j in 0 1 2 3
22 test $i -eq $j && continue
23 diff -u frotz.$i frotz.$j |
24 sed -e '
25 /^---/s|.*|--- a/frotz|
26 /^+++/s|.*|+++ b/frotz|' >diff.$i-$j
27 cat frotz.$i >frotz
28 test_expect_success \
29 "apply diff between $i and $j" \
30 "git-apply <diff.$i-$j && diff frotz.$j frotz"
31 done
32 done
34 test_done