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
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2009-02-19 14:13:36 +0300
committerJunio C Hamano <gitster@pobox.com>2009-02-20 11:02:40 +0300
commit85569d7498f3933d96a7604512f8832c73127067 (patch)
tree9ba97380a9beae85248602017e9b228f2767ba64 /t/t4002-diff-basic.sh
parent901c369af52ffcc8c08457fb5b330eab217a9cfb (diff)
Test that diff can read from stdin
Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4002-diff-basic.sh')
-rwxr-xr-xt/t4002-diff-basic.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
index cc3681f161..18695ce821 100755
--- a/t/t4002-diff-basic.sh
+++ b/t/t4002-diff-basic.sh
@@ -258,4 +258,12 @@ test_expect_success \
git diff-tree -r -R $tree_A $tree_B >.test-b &&
cmp -s .test-a .test-b'
+test_expect_success \
+ 'diff can read from stdin' \
+ 'test_must_fail git diff --no-index -- MN - < NN |
+ grep -v "^index" | sed "s#/-#/NN#" >.test-a &&
+ test_must_fail git diff --no-index -- MN NN |
+ grep -v "^index" >.test-b &&
+ test_cmp .test-a .test-b'
+
test_done