Diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0104-tree.sh | 9 |
1 file changed, 9 insertions, 0 deletions
diff --git a/tests/t0104-tree.sh b/tests/t0104-tree.sh index ca29bdc..35b1948 100755 --- a/tests/t0104-tree.sh +++ b/tests/t0104-tree.sh @@ -169,6 +169,15 @@ test_expect_success 'a file row still offers blame' ' grep ">blame</a>" tmp ' +# A submodule's commit lives in another repository, so its path points there +# the way its row in the listing does. +test_expect_success 'a submodule path is answered with the submodule' ' + sub=$(git -C repos/submodules rev-parse HEAD~1) && + cgit_rc submodrc "url=submodules/tree/vendor/sub" >tmp && + grep "^Status: 404" tmp && + grep "<div class=.error.>This path is a submodule: <span class=.ls-mod.>sub</span> @ <span class=.ls-mod-hash. title=.$sub.>" tmp +' + # A link target inside the tree becomes a link, while an absolute one names a # file on whatever machine checks the tree out, not a path in the tree. test_expect_success 'only a link target inside the tree is linked' ' |
