Browse Source

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>
maint
Karl Hasselström 17 years ago committed by Junio C Hamano
parent
commit
5bf707cde1
  1. 14
      t/t4002-diff-basic.sh

14
t/t4002-diff-basic.sh

@ -168,6 +168,20 @@ test_expect_success \ @@ -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 &&

Loading…
Cancel
Save