From 85569d7498f3933d96a7604512f8832c73127067 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Thu, 19 Feb 2009 12:13:36 +0100 Subject: [PATCH] Test that diff can read from stdin Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- t/t4002-diff-basic.sh | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.30.2