1 #!/bin/sh
3 test_description='git apply --numstat - <patch'
5 . ./test-lib.sh
7 test_expect_success setup '
8 echo hello >text &&
9 git add text &&
10 echo goodbye >text &&
11 git diff >patch
12 '
14 test_expect_success 'git apply --numstat - < patch' '
15 echo "1 1 text" >expect &&
16 git apply --numstat - <patch >actual &&
17 test_cmp expect actual
18 '
20 test_expect_success 'git apply --numstat - < patch patch' '
21 for i in 1 2; do echo "1 1 text"; done >expect &&
22 git apply --numstat - < patch patch >actual &&
23 test_cmp expect actual
24 '
26 test_done