t0000-t3999: detect and signal failure within loop
[git/debian.git] / t / t4106-apply-stdin.sh
blob1e70810b9cd63e3d9fb70d1c56534485eba1f85a
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
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
20 test_expect_success 'git apply --numstat - < patch patch' '
21 cat >expect <<-\EOF &&
22 1 1 text
23 1 1 text
24 EOF
25 git apply --numstat - < patch patch >actual &&
26 test_cmp expect actual
29 test_done