X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3100-ls-tree-restrict.sh;h=e10749245b454f4c71486e536049cbf5b09259d5;hb=95655d79ad13697e0d68e986d3b0b402efad007a;hp=ae086755ea7b727b29811c8ce8cd32a7e2bd6e0f;hpb=5401f3040b61e11da79d676e42aacfa9f1131083;p=git.git diff --git a/t/t3100-ls-tree-restrict.sh b/t/t3100-ls-tree-restrict.sh index ae086755e..e10749245 100755 --- a/t/t3100-ls-tree-restrict.sh +++ b/t/t3100-ls-tree-restrict.sh @@ -35,7 +35,7 @@ _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" test_output () { sed -e "s/ $_x40 / X /" check - diff -u expected check + git diff expected check } test_expect_success \ @@ -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 && @@ -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