summaryrefslogtreecommitdiff
path: root/t/t4002-diff-basic.sh
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2009-02-19 11:13:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-02-20 08:02:40 (GMT)
commit85569d7498f3933d96a7604512f8832c73127067 (patch)
tree9ba97380a9beae85248602017e9b228f2767ba64 /t/t4002-diff-basic.sh
parent901c369af52ffcc8c08457fb5b330eab217a9cfb (diff)
downloadgit-85569d7498f3933d96a7604512f8832c73127067.zip
git-85569d7498f3933d96a7604512f8832c73127067.tar.gz
git-85569d7498f3933d96a7604512f8832c73127067.tar.bz2
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 cc3681f..18695ce 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