Skip to content

Commit

Permalink
t3100: add ls-tree -t and -d tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Dec 2, 2005
1 parent a6b51f1 commit 57ae0d0
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions t/t3100-ls-tree-restrict.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,29 @@ test_expect_success \
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 &&
Expand Down Expand Up @@ -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

0 comments on commit 57ae0d0

Please sign in to comment.