1#!/bin/sh
2#
3# Copyright (c) 2005 Junio C Hamano
4# Copyright (c) 2005 Robert Fitzsimons
5#
67
test_description='git apply test patches with multiple fragments.'
89
. ./test-lib.sh
1011
cp "$TEST_DIRECTORY/t4109/patch1.patch" .
12cp "$TEST_DIRECTORY/t4109/patch2.patch" .
13cp "$TEST_DIRECTORY/t4109/patch3.patch" .
14cp "$TEST_DIRECTORY/t4109/patch4.patch" .
1516
test_expect_success 'git apply (1)' '
17git apply patch1.patch patch2.patch &&
18test_cmp "$TEST_DIRECTORY/t4109/expect-1" main.c
19'
20rm -f main.c
2122
test_expect_success 'git apply (2)' '
23git apply patch1.patch patch2.patch patch3.patch &&
24test_cmp "$TEST_DIRECTORY/t4109/expect-2" main.c
25'
26rm -f main.c
2728
test_expect_success 'git apply (3)' '
29git apply patch1.patch patch4.patch &&
30test_cmp "$TEST_DIRECTORY/t4109/expect-3" main.c
31'
32mv main.c main.c.git
3334
test_done
35