Skip to content

Commit

Permalink
Test that diff can read from stdin
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Thomas Rast authored and Junio C Hamano committed Feb 20, 2009
1 parent 901c369 commit 85569d7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t/t4002-diff-basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 85569d7

Please sign in to comment.