summaryrefslogtreecommitdiff
path: root/t/t4002-diff-basic.sh
diff options
context:
space:
mode:
authorKarl Hasselström <kha@treskal.com>2008-08-10 18:13:04 +0200
committerJunio C Hamano <gitster@pobox.com>2008-08-11 01:35:47 -0700
commit5bf707cde14f60b7a066bdab5dbdefaec1a1d0a9 (patch)
tree52510cbdfd00b2bf719864f32a562b02e0897550 /t/t4002-diff-basic.sh
parent140b378d07229e3bcef0613e11aa0a04e4db3ecf (diff)
downloadgit-5bf707cde14f60b7a066bdab5dbdefaec1a1d0a9.tar.gz
Add test for diff-tree --stdin with two trees
Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4002-diff-basic.sh')
-rwxr-xr-xt/t4002-diff-basic.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
index a4cfde6b29..27743c4c59 100755
--- a/t/t4002-diff-basic.sh
+++ b/t/t4002-diff-basic.sh
@@ -169,6 +169,20 @@ test_expect_success \
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 &&
git diff-index --cached $tree_O >.test-a &&