X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft4002-diff-basic.sh;h=18695ce8218a7b383258eeb0bad84b4d4bde45be;hb=b30ccd757354ea09b41e4359b0a5ab429d12f02e;hp=cc3681f16118ca70ae9f65a27ccd6f354a6deee1;hpb=934747323c397ffe64b6dcdf2bf73128d8e36968;p=git.git 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