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