Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Move the root-readme test to the index tests
The test reads the index and the site about page, both drawn by
ui-repolist.c. Its site had no repositories, so the index it read was
the error page, and a readme printed below the list went unseen. The
shared repositories give it a real index.
Diffstat (limited to 'tests/t0101-index.sh')
| -rwxr-xr-x | tests/t0101-index.sh | 12 |
1 file changed, 12 insertions, 0 deletions
diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh index e3d2148..d3d4469 100755 --- a/tests/t0101-index.sh +++ b/tests/t0101-index.sh @@ -44,6 +44,18 @@ test_expect_success 'each css and js entry gets a link of its own' ' grep "/b.js" scripts ' +# root-readme is the site's own file rather than repository content, so it +# goes out as written, on an about page of its own. +test_expect_success 'root-readme without a filter is its own page, as written' ' + echo "<b>site</b>" >root.html && + cgitrc_copy rootrc "root-readme=$PWD/root.html" && + cgit_ok rootrc "url=" >tmp && + test_grep "<li><a title=.About this site. href=./?p=about.>about</a>" tmp && + test_grep ! "<b>site</b>" tmp && + cgit_ok rootrc "p=about" >tmp && + test_grep "^<b>site</b>$" tmp +' + # The description limit counts bytes, so a cut has to land between # characters rather than leave half of one on the page. test_expect_success 'a cut description keeps whole characters' ' |
