Add test for diff-tree --stdin with two trees
authorKarl Hasselström <kha@treskal.com>
Sun, 10 Aug 2008 16:13:04 +0000 (18:13 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Aug 2008 08:35:47 +0000 (01:35 -0700)
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4002-diff-basic.sh

index a4cfde6b2927a4655f582d7e92dad4568f7b5f89..27743c4c5973798ca7ae511a8c4610b17fe848a8 100755 (executable)
@@ -168,6 +168,20 @@ test_expect_success \
     'git diff-tree -r $tree_A $tree_B >.test-a &&
      cmp -s .test-a .test-recursive-AB'
 
+test_expect_success \
+    'diff-tree --stdin of known trees.' \
+    'echo $tree_A $tree_B | git diff-tree --stdin > .test-a &&
+     echo $tree_A $tree_B > .test-plain-ABx &&
+     cat .test-plain-AB >> .test-plain-ABx &&
+     cmp -s .test-a .test-plain-ABx'
+
+test_expect_success \
+    'diff-tree --stdin of known trees.' \
+    'echo $tree_A $tree_B | git diff-tree -r --stdin > .test-a &&
+     echo $tree_A $tree_B > .test-recursive-ABx &&
+     cat .test-recursive-AB >> .test-recursive-ABx &&
+     cmp -s .test-a .test-recursive-ABx'
+
 test_expect_success \
     'diff-cache O with A in cache' \
     'git read-tree $tree_A &&