From: Thomas Rast Date: Thu, 19 Feb 2009 11:13:36 +0000 (+0100) Subject: Test that diff can read from stdin X-Git-Tag: v1.6.3-rc0~176^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=85569d7498f3933d96a7604512f8832c73127067;p=git.git Test that diff can read from stdin Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh index cc3681f16..18695ce82 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