From 035394e3836fb981c7b0d3e4b72ca745fb56e0ad Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 10:04:02 -1000 Subject: Check the whole page in the extension tests A page that died part way through, or logged an error, passed as long as the text grepped for came before the failure. Four tests also read the page an earlier test had fetched, so none of them could run alone. --- tests/t0501-about-render.sh | 38 +++++++++++++++++++------------------- tests/t0502-syntax-highlight.sh | 13 +++++++------ tests/t0503-link-commits.sh | 9 +++++---- tests/t0504-email-avatar.sh | 6 +++--- tests/t0506-link-trailers.sh | 10 ++++++---- 5 files changed, 40 insertions(+), 36 deletions(-) diff --git a/tests/t0501-about-render.sh b/tests/t0501-about-render.sh index 56f2e77..2cf84ed 100755 --- a/tests/t0501-about-render.sh +++ b/tests/t0501-about-render.sh @@ -83,39 +83,39 @@ then fi test_expect_success CGIT_LUA_LPEG 'the about page renders the markdown' ' - cgit_url "md/about/" >tmp && - grep "

The Title

" tmp && - grep "bold" tmp + cgit_ok_url "md/about/" >tmp && + test_grep "

The Title

" tmp && + test_grep "bold" tmp ' test_expect_success CGIT_LUA_LPEG 'readme markup reaches the page escaped' ' - cgit_url "md/about/" >tmp && - grep "<script>alert(1)</script>" tmp && - ! grep "