[PATCH 2/8] Test that diff can read from stdin
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Feb 15, 2009, 22:25 UTC
- Message-ID
- <f5c76146f2c038dcc4f05f0e825b802f5b55fb1a.1234736374.git.trast@student.ethz.ch>
- In-Reply-To
- <cover.1234736374.git.trast@student.ethz.ch>
Signed-off-by: Thomas Rast <trast@student.ethz.ch> ---
Not the best possible place to put this, but t4013-diff-various.sh doesn't let me do input redirections in its framework.
t/t4002-diff-basic.sh | 8 ++++++++ 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
-- 1.6.2.rc0.335.g1a2b