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.
14 cat > patch1.
patch <<\EOF
15 diff --git a
/new.txt b
/new.txt
33 cat > patch2.
patch <<\EOF
34 diff --git a
/new.txt b
/new.txt
46 cat > patch3.
patch <<\EOF
47 diff --git a
/new.txt b
/new.txt
62 cat > patch4.
patch <<\EOF
63 diff --git a
/new.txt b
/new.txt
75 cat > patch5.
patch <<\EOF
76 diff --git a
/new.txt b
/new.txt
89 test_expect_success
"S = git-apply scan" \
90 'git-apply patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch'
93 test_expect_success
"S = patch scan" \
94 'cat patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch | patch'
97 test_expect_success
"S = cmp" \
98 'cmp apply.txt patch.txt'