3 # Copyright (c) 2005 Junio C Hamano
4 # Copyright (c) 2005 Robert Fitzsimons
7 test_description
='git apply test patches with multiple fragments.
16 cp ..
/t4109
/patch1.
patch .
17 cp ..
/t4109
/patch2.
patch .
18 cp ..
/t4109
/patch3.
patch .
19 cp ..
/t4109
/patch4.
patch .
21 test_expect_success
"S = git apply (1)" \
22 'git apply patch1.patch patch2.patch'
25 test_expect_success
"S = patch (1)" \
26 'cat patch1.patch patch2.patch | patch -p1'
28 test_expect_success
"S = cmp (1)" \
29 'cmp main.c.git main.c'
31 rm -f main.c main.c.git
33 test_expect_success
"S = git apply (2)" \
34 'git apply patch1.patch patch2.patch patch3.patch'
37 test_expect_success
"S = patch (2)" \
38 'cat patch1.patch patch2.patch patch3.patch | patch -p1'
40 test_expect_success
"S = cmp (2)" \
41 'cmp main.c.git main.c'
43 rm -f main.c main.c.git
45 test_expect_success
"S = git apply (3)" \
46 'git apply patch1.patch patch4.patch'
49 test_expect_success
"S = patch (3)" \
50 'cat patch1.patch patch4.patch | patch -p1'
52 test_expect_success
"S = cmp (3)" \
53 'cmp main.c.git main.c'