3 # Copyright (c) 2005 Junio C Hamano
4 # Copyright (c) 2005 Robert Fitzsimons
7 test_description
='git apply test for patches which require scanning forwards and backwards.
18 cat > patch1.
patch <<\EOF
19 diff --git a
/new.txt b
/new.txt
37 cat > patch2.
patch <<\EOF
38 diff --git a
/new.txt b
/new.txt
50 cat > patch3.
patch <<\EOF
51 diff --git a
/new.txt b
/new.txt
66 cat > patch4.
patch <<\EOF
67 diff --git a
/new.txt b
/new.txt
79 cat > patch5.
patch <<\EOF
80 diff --git a
/new.txt b
/new.txt
93 test_expect_success
"S = git apply scan" \
94 'git apply patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch'
97 test_expect_success
"S = patch scan" \
98 'cat patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch | patch'
101 test_expect_success
"S = cmp" \
102 'cmp apply.txt patch.txt'