Test that diff can read from stdin
Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast committed
Feb 19, 2009 at 12:13 UTC
85569d7498f3933d96a7604512f8832c73127067
1 file changed
+8
t/t4002-diff-basic.sh
+8
@@ -258,4 +258,12 @@ test_expect_success \
258
git diff-tree -r -R $tree_A $tree_B >.test-b &&
259
cmp -s .test-a .test-b'
260
261
+test_expect_success \
262
+ 'diff can read from stdin' \
263
+ 'test_must_fail git diff --no-index -- MN - < NN |
264
+ grep -v "^index" | sed "s#/-#/NN#" >.test-a &&
265
+ test_must_fail git diff --no-index -- MN NN |
266
+ grep -v "^index" >.test-b &&
267
+ test_cmp .test-a .test-b'
268
+
269
test_done