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/t0102-summary.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/t0102-summary.sh') diff --git a/tests/t0102-summary.sh b/tests/t0102-summary.sh index 7df18e4..8d44ef4 100755 --- a/tests/t0102-summary.sh +++ b/tests/t0102-summary.sh @@ -11,7 +11,7 @@ test_description='Check content on summary page' test_expect_success 'generate foo summary' 'cgit_url "foo" >tmp' test_expect_success 'find commit 1' 'grep "commit 1" tmp' test_expect_success 'find commit 5' 'grep "commit 5" tmp' -test_expect_success 'find branch master' 'grep "master" tmp' +test_expect_success 'find branch master' 'grep "]*>master" tmp' test_expect_success 'no tags' '! grep "Tag" tmp' test_expect_success 'clone-url expanded correctly' ' grep "git://example.org/foo.git" tmp @@ -24,7 +24,7 @@ test_expect_success 'repo description reaches the meta tag' ' test_expect_success 'no commit 45' '! grep "commit 45" tmp' test_expect_success 'find commit 46' 'grep "commit 46" tmp' test_expect_success 'find commit 50' 'grep "commit 50" tmp' -test_expect_success 'find branch master' 'grep "master" tmp' +test_expect_success 'find branch master' 'grep "]*>master" tmp' test_expect_success 'no tags' '! grep "Tag" tmp' test_expect_success 'clone-url expanded correctly' ' grep "git://example.org/bar.git" tmp -- cgit