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/t0506-link-trailers.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/t0506-link-trailers.sh') diff --git a/tests/t0506-link-trailers.sh b/tests/t0506-link-trailers.sh index 03db63a..42c65fd 100755 --- a/tests/t0506-link-trailers.sh +++ b/tests/t0506-link-trailers.sh @@ -46,16 +46,18 @@ test_expect_success 'point cgit at it through the trailer filter' ' ' test_expect_success CGIT_LUA 'the Fixes object name links to its commit page' ' - cgit_url "linky/commit/" >tmp && - grep "Fixes1234567 (.earlier.)" tmp + cgit_ok_url "linky/commit/" >tmp && + test_grep "Fixes1234567 (.earlier.)" tmp ' test_expect_success CGIT_LUA 'the bare URL links to itself' ' - grep "https://example.com/?a=1&b=2" tmp + cgit_ok_url "linky/commit/" >tmp && + test_grep "https://example.com/?a=1&b=2" tmp ' test_expect_success CGIT_LUA 'the Closes mark stays text' ' - grep "Closes#45" tmp + cgit_ok_url "linky/commit/" >tmp && + test_grep "Closes#45" tmp ' test_done -- cgit 2.12.1