summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-02 06:49:52 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-12-02 06:49:52 (GMT)
commit57ae0d09ed3c4e409bed78b77322fa5e9bad3f3f (patch)
tree8bdba8fbdc914aadb7c005d4590ec356cc4ec766
parenta6b51f11ab7f7f838a9b17f81059eebfc36e4c84 (diff)
downloadgit-57ae0d09ed3c4e409bed78b77322fa5e9bad3f3f.zip
git-57ae0d09ed3c4e409bed78b77322fa5e9bad3f3f.tar.gz
git-57ae0d09ed3c4e409bed78b77322fa5e9bad3f3f.tar.bz2
t3100: add ls-tree -t and -d tests.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xt/t3100-ls-tree-restrict.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/t/t3100-ls-tree-restrict.sh b/t/t3100-ls-tree-restrict.sh
index ae08675..2ec06d3 100755
--- a/t/t3100-ls-tree-restrict.sh
+++ b/t/t3100-ls-tree-restrict.sh
@@ -61,6 +61,29 @@ EOF
test_output'
test_expect_success \
+ 'ls-tree recursive with -t' \
+ 'git-ls-tree -r -t $tree >current &&
+ cat >expected <<\EOF &&
+100644 blob X path0
+120000 blob X path1
+040000 tree X path2
+040000 tree X path2/baz
+100644 blob X path2/baz/b
+120000 blob X path2/bazbo
+100644 blob X path2/foo
+EOF
+ test_output'
+
+test_expect_success \
+ 'ls-tree recursive with -d' \
+ 'git-ls-tree -r -d $tree >current &&
+ cat >expected <<\EOF &&
+040000 tree X path2
+040000 tree X path2/baz
+EOF
+ test_output'
+
+test_expect_success \
'ls-tree filtered with path' \
'git-ls-tree $tree path >current &&
cat >expected <<\EOF &&
@@ -117,4 +140,19 @@ test_expect_success \
EOF
test_output'
+test_expect_success \
+ 'ls-tree filtered with path2/bak' \
+ 'git-ls-tree $tree path2/bak >current &&
+ cat >expected <<\EOF &&
+EOF
+ test_output'
+
+test_expect_success \
+ 'ls-tree -t filtered with path2/bak' \
+ 'git-ls-tree -t $tree path2/bak >current &&
+ cat >expected <<\EOF &&
+040000 tree X path2
+EOF
+ test_output'
+
test_done