| # Copyright (c) 2005 Junio C Hamano |
| # Copyright (c) 2005 Robert Fitzsimons |
| test_description='git apply test for patches which require scanning forwards and backwards. |
| cat > patch1.patch <<\EOF |
| diff --git a/new.txt b/new.txt |
| cat > patch2.patch <<\EOF |
| diff --git a/new.txt b/new.txt |
| cat > patch3.patch <<\EOF |
| diff --git a/new.txt b/new.txt |
| cat > patch4.patch <<\EOF |
| diff --git a/new.txt b/new.txt |
| cat > patch5.patch <<\EOF |
| diff --git a/new.txt b/new.txt |
| test_expect_success "S = git apply scan" \ |
| 'git apply patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch' |
| test_expect_success "S = patch scan" \ |
| 'cat patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch | patch' |
| test_expect_success "S = cmp" \ |
| 'cmp apply.txt patch.txt' |