Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-18 10:06:53 +0300
committerJunio C Hamano <gitster@pobox.com>2009-01-18 10:06:53 +0300
commit8f31355692f33944e9c1240de8b175c43f857de1 (patch)
tree3d0ee0537996b6712a7b23beb0cbc6f5b9209eaf /t
parent90abc19b5ab53a49018a1beff0b3df260daa38e4 (diff)
parent64912a67a43dec151906b93f96b07f16e17f71e9 (diff)
Merge branch 'mv/apply-parse-opt'
* mv/apply-parse-opt: Resurrect "git apply --flags -" to read from the standard input parse-opt: migrate builtin-apply.
Diffstat (limited to 't')
-rwxr-xr-xt/t4106-apply-stdin.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t4106-apply-stdin.sh b/t/t4106-apply-stdin.sh
new file mode 100755
index 0000000000..72467a1e8e
--- /dev/null
+++ b/t/t4106-apply-stdin.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+test_description='git apply --numstat - <patch'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+ echo hello >text &&
+ git add text &&
+ echo goodbye >text &&
+ git diff >patch
+'
+
+test_expect_success 'git apply --numstat - < patch' '
+ echo "1 1 text" >expect &&
+ git apply --numstat - <patch >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'git apply --numstat - < patch patch' '
+ for i in 1 2; do echo "1 1 text"; done >expect &&
+ git apply --numstat - < patch patch >actual &&
+ test_cmp expect actual
+'
+
+test_done