From 5bf707cde14f60b7a066bdab5dbdefaec1a1d0a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karl=20Hasselstr=C3=B6m?= Date: Sun, 10 Aug 2008 18:13:04 +0200 Subject: [PATCH] Add test for diff-tree --stdin with two trees MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Karl Hasselström Signed-off-by: Junio C Hamano --- t/t4002-diff-basic.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 @@ -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 && -- 2.26.2