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>
Karl Hasselström committed
Aug 10, 2008 at 18:13 UTC
5bf707cde14f60b7a066bdab5dbdefaec1a1d0a9
1 file changed
+14
t/t4002-diff-basic.sh
+14
@@ -168,6 +168,20 @@ test_expect_success \
168
'git diff-tree -r $tree_A $tree_B >.test-a &&
169
cmp -s .test-a .test-recursive-AB'
170
171
+test_expect_success \
172
+ 'diff-tree --stdin of known trees.' \
173
+ 'echo $tree_A $tree_B | git diff-tree --stdin > .test-a &&
174
+ echo $tree_A $tree_B > .test-plain-ABx &&
175
+ cat .test-plain-AB >> .test-plain-ABx &&
176
+ cmp -s .test-a .test-plain-ABx'
177
+
178
+test_expect_success \
179
+ 'diff-tree --stdin of known trees.' \
180
+ 'echo $tree_A $tree_B | git diff-tree -r --stdin > .test-a &&
181
+ echo $tree_A $tree_B > .test-recursive-ABx &&
182
+ cat .test-recursive-AB >> .test-recursive-ABx &&
183
+ cmp -s .test-a .test-recursive-ABx'
184
+
185
test_expect_success \
186
'diff-cache O with A in cache' \
187
'git read-tree $tree_A &&