Diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0101-index.sh | 11 |
1 file changed, 11 insertions, 0 deletions
diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh index 0953b8d..fcf873b 100755 --- a/tests/t0101-index.sh +++ b/tests/t0101-index.sh @@ -53,6 +53,17 @@ test_expect_success 'a cut description keeps whole characters' ' grep ">日本語\.\.\.</a>" tmp ' +# A url naming no repository falls through to the index as a prefix that +# matches none, which is not the same as a search finding nothing. +test_expect_success 'a url matching no repository says so' ' + cgit_url "nonexistent/tree/" >tmp && + grep "^Status: 404" tmp && + grep "<div class=.error.>Nothing matches this url</div>" tmp && + cgit_query "q=nonexistent" >tmp && + grep "^Status: 404" tmp && + grep "<div class=.error.>No repositories found</div>" tmp +' + # The index sorts by a column only when asked, which nothing else exercises. test_expect_success 'the index sorts by a column on request' ' cgit_query "s=name" >tmp && |
