]> git.ipfire.org Git - thirdparty/git.git/blob - t/t4106-apply-stdin.sh
The third batch
[thirdparty/git.git] / t / t4106-apply-stdin.sh
1 #!/bin/sh
2
3 test_description='git apply --numstat - <patch'
4
5
6 TEST_PASSES_SANITIZE_LEAK=true
7 . ./test-lib.sh
8
9 test_expect_success setup '
10 echo hello >text &&
11 git add text &&
12 echo goodbye >text &&
13 git diff >patch
14 '
15
16 test_expect_success 'git apply --numstat - < patch' '
17 echo "1 1 text" >expect &&
18 git apply --numstat - <patch >actual &&
19 test_cmp expect actual
20 '
21
22 test_expect_success 'git apply --numstat - < patch patch' '
23 cat >expect <<-\EOF &&
24 1 1 text
25 1 1 text
26 EOF
27 git apply --numstat - < patch patch >actual &&
28 test_cmp expect actual
29 '
30
31 test_done