]> git.ipfire.org Git - thirdparty/git.git/blob - t/t4106-apply-stdin.sh
Merge branch 'jz/apply-quiet-and-allow-empty'
[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 for i in 1 2; do echo "1 1 text"; done >expect &&
24 git apply --numstat - < patch patch >actual &&
25 test_cmp expect actual
26 '
27
28 test_done