aboutsummaryrefslogtreecommitdiff
path: root/t
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
parent140b378d07229e3bcef0613e11aa0a04e4db3ecf (diff)
downloadgit-5bf707cde14f60b7a066bdab5dbdefaec1a1d0a9.tar.gz
git-5bf707cde14f60b7a066bdab5dbdefaec1a1d0a9.tar.xz
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')
-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 a4cfde6b2..27743c4c5 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 &&