]>
Commit | Line | Data |
---|---|---|
ff3412ee RF |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2005 Junio C Hamano | |
4 | # Copyright (c) 2005 Robert Fitzsimons | |
5 | # | |
6 | ||
ac2e28c0 | 7 | test_description='git apply test patches with multiple fragments.' |
ff3412ee | 8 | |
f54f48fc ÆAB |
9 | |
10 | TEST_PASSES_SANITIZE_LEAK=true | |
ff3412ee RF |
11 | . ./test-lib.sh |
12 | ||
ac2e28c0 JH |
13 | cp "$TEST_DIRECTORY/t4109/patch1.patch" . |
14 | cp "$TEST_DIRECTORY/t4109/patch2.patch" . | |
15 | cp "$TEST_DIRECTORY/t4109/patch3.patch" . | |
16 | cp "$TEST_DIRECTORY/t4109/patch4.patch" . | |
ff3412ee | 17 | |
ac2e28c0 JH |
18 | test_expect_success 'git apply (1)' ' |
19 | git apply patch1.patch patch2.patch && | |
20 | test_cmp "$TEST_DIRECTORY/t4109/expect-1" main.c | |
21 | ' | |
22 | rm -f main.c | |
ff3412ee | 23 | |
ac2e28c0 JH |
24 | test_expect_success 'git apply (2)' ' |
25 | git apply patch1.patch patch2.patch patch3.patch && | |
26 | test_cmp "$TEST_DIRECTORY/t4109/expect-2" main.c | |
27 | ' | |
28 | rm -f main.c | |
ff3412ee | 29 | |
ac2e28c0 JH |
30 | test_expect_success 'git apply (3)' ' |
31 | git apply patch1.patch patch4.patch && | |
32 | test_cmp "$TEST_DIRECTORY/t4109/expect-3" main.c | |
33 | ' | |
ff3412ee RF |
34 | mv main.c main.c.git |
35 | ||
ff3412ee RF |
36 | test_done |
37 |