From b67a638667f7dcd9ac6b2c053b0d2ea89f73ec56 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 16:11:00 -1000 Subject: Read the surplus conversions from their own page The check read the page the previous test had left, and it took any hex where the commit goes and only two of the eight conversions. --- tests/t0301-security.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/t0301-security.sh') diff --git a/tests/t0301-security.sh b/tests/t0301-security.sh index 4745c44..136df74 100755 --- a/tests/t0301-security.sh +++ b/tests/t0301-security.sh @@ -250,13 +250,10 @@ test_expect_success 'set up a submodule fixture with a hostile module-link' ' } >modlinkrc ' -test_expect_success 'a surplus conversion does not crash the tree view' ' - cgit_rc modlinkrc "url=modlink/tree/" >tmp && - grep "ls-mod" tmp -' - test_expect_success 'a surplus conversion is shown literally, not filled' ' - grep "href=./m/submod/[0-9a-f]*/%s/%s/" tmp + sub=$(git -C scan/modlink rev-parse HEAD:submod) && + cgit_ok modlinkrc "url=modlink/tree/" >tmp && + test_grep "href=./m/submod/$sub/%s/%s/%s/%s/%s/%s/%s/%s.>submod" tmp ' test_expect_success 'a well-formed module-link still takes name and sha1' ' -- cgit 2.12.1