interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / t4106-apply-stdin.sh

30 lines · 531 bytes Raw Blame History
1#!/bin/sh
2
3test_description='git apply --numstat - <patch'
4
5
6. ./test-lib.sh
7
8test_expect_success setup '
9 echo hello >text &&
10 git add text &&
11 echo goodbye >text &&
12 git diff >patch
13'
14
15test_expect_success 'git apply --numstat - < patch' '
16 echo "1 1 text" >expect &&
17 git apply --numstat - <patch >actual &&
18 test_cmp expect actual
19'
20
21test_expect_success 'git apply --numstat - < patch patch' '
22 cat >expect <<-\EOF &&
23 1 1 text
24 1 1 text
25 EOF
26 git apply --numstat - < patch patch >actual &&
27 test_cmp expect actual
28'
29
30test_done