]> git.ipfire.org Git - thirdparty/git.git/blame - t/t4106-apply-stdin.sh
Start the 2.46 cycle
[thirdparty/git.git] / t / t4106-apply-stdin.sh
CommitLineData
64912a67
JH
1#!/bin/sh
2
3test_description='git apply --numstat - <patch'
4
f54f48fc
ÆAB
5
6TEST_PASSES_SANITIZE_LEAK=true
64912a67
JH
7. ./test-lib.sh
8
9test_expect_success setup '
10 echo hello >text &&
11 git add text &&
12 echo goodbye >text &&
13 git diff >patch
14'
15
16test_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
22test_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
31test_done