@matheusbsbs / matheus-bagliano / commits / 57ae0d09ed
Fork 0

t3100: add ls-tree -t and -d tests.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Dec 1, 2005 at 22:49 UTC 57ae0d09ed3c4e409bed78b77322fa5e9bad3f3f
1 file changed +38
t/t3100-ls-tree-restrict.sh
+38
@@ -60,6 +60,29 @@ test_expect_success \
60 EOF
61 test_output'
62
63 +test_expect_success \
64 + 'ls-tree recursive with -t' \
65 + 'git-ls-tree -r -t $tree >current &&
66 + cat >expected <<\EOF &&
67 +100644 blob X path0
68 +120000 blob X path1
69 +040000 tree X path2
70 +040000 tree X path2/baz
71 +100644 blob X path2/baz/b
72 +120000 blob X path2/bazbo
73 +100644 blob X path2/foo
74 +EOF
75 + test_output'
76 +
77 +test_expect_success \
78 + 'ls-tree recursive with -d' \
79 + 'git-ls-tree -r -d $tree >current &&
80 + cat >expected <<\EOF &&
81 +040000 tree X path2
82 +040000 tree X path2/baz
83 +EOF
84 + test_output'
85 +
86 test_expect_success \
87 'ls-tree filtered with path' \
88 'git-ls-tree $tree path >current &&
@@ -117,4 +140,19 @@ test_expect_success \
140 EOF
141 test_output'
142
143 +test_expect_success \
144 + 'ls-tree filtered with path2/bak' \
145 + 'git-ls-tree $tree path2/bak >current &&
146 + cat >expected <<\EOF &&
147 +EOF
148 + test_output'
149 +
150 +test_expect_success \
151 + 'ls-tree -t filtered with path2/bak' \
152 + 'git-ls-tree -t $tree path2/bak >current &&
153 + cat >expected <<\EOF &&
154 +040000 tree X path2
155 +EOF
156 + test_output'
157 +
158 test_done