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