From a63115c491416fc1f02c48c6e07f6d1d57c018fc Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 19:21:59 -1000 Subject: 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. --- tests/t0101-index.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/t0101-index.sh') 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 "site" >root.html && + cgitrc_copy rootrc "root-readme=$PWD/root.html" && + cgit_ok rootrc "url=" >tmp && + test_grep "
  • about" tmp && + test_grep ! "site" tmp && + cgit_ok rootrc "p=about" >tmp && + test_grep "^site$" 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' ' -- cgit 2.12.1