From 7e635e77f4aa4ef3d2fea2f67d724d0cdd1bc922 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:06:39 -0700 Subject: Tighten the checks that match stray text Every page holds foo in its footer element, the foo+bar row holds bar, the branch switcher holds master, and commit 1 and file-1 also match commits 10 to 19 and file-10 to file-19. A search page repeats its term in the search box. So these checks passed on pages that lacked what they look for, and each now matches the link itself. --- tests/t0101-index.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/t0101-index.sh') diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh index 8d389b6..e50f0f8 100755 --- a/tests/t0101-index.sh +++ b/tests/t0101-index.sh @@ -11,9 +11,9 @@ test_description='Check content on index page' . ./setup.sh test_expect_success 'generate index page' 'cgit_url "" >tmp' -test_expect_success 'find foo repo' 'grep "foo" tmp' +test_expect_success 'find foo repo' 'grep ">foo" tmp' test_expect_success 'find foo description' 'grep "\[no description\]" tmp' -test_expect_success 'find bar repo' 'grep "bar" tmp' +test_expect_success 'find bar repo' 'grep ">bar" tmp' test_expect_success 'find bar description' 'grep "the bar repo" tmp' test_expect_success 'find foo+bar repo' 'grep ">foo+bar<" tmp' test_expect_success 'verify foo+bar links' 'test $(grep -o "href=./foo%2Bbar/." tmp | wc -l) = 2' -- cgit