]>
Commit | Line | Data |
---|---|---|
64912a67 JH |
1 | #!/bin/sh |
2 | ||
3 | test_description='git apply --numstat - <patch' | |
4 | ||
f54f48fc ÆAB |
5 | |
6 | TEST_PASSES_SANITIZE_LEAK=true | |
64912a67 JH |
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' ' | |
020b813f ES |
23 | cat >expect <<-\EOF && |
24 | 1 1 text | |
25 | 1 1 text | |
26 | EOF | |
64912a67 JH |
27 | git apply --numstat - < patch patch >actual && |
28 | test_cmp expect actual | |
29 | ' | |
30 | ||
31 | test_done |