Diff options
| -rwxr-xr-x | tests/t0101-index.sh | 17 |
1 file changed, 17 insertions, 0 deletions
diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh index ca0c88d..f8118b3 100755 --- a/tests/t0101-index.sh +++ b/tests/t0101-index.sh @@ -69,6 +69,23 @@ test_expect_success 'a url matching no repository says so' ' grep "<div class=.error.>No repositories found</div>" tmp ' +test_expect_success 'a search finding nothing under a url prefix says so' ' + { + echo "virtual-root=/" && + echo "cache-size=0" && + echo "repo.url=a/x" && + echo "repo.path=$PWD/repos/foo/.git" && + echo "repo.url=a/y" && + echo "repo.path=$PWD/repos/foo/.git" + } >prefixrc && + cgit_ok prefixrc "url=a/" >tmp && + test_grep ">a/x</a>" tmp && + test_grep ">a/y</a>" tmp && + cgit_rc prefixrc "url=a/&q=zzz" >tmp && + test_grep "^Status: 404" tmp && + test_grep "<div class=.error.>No repositories found</div>" tmp +' + # Fails unless the index of orderrc, asked for with the query given first, # lists the repositories in the order the rest name. test_index_order() { |
