From ff3c9acf91e5bd33e44cad93f51901654dbb8306 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 19:15:48 -1000 Subject: Test the about path check for each kind of readme Three tests exercised the single path check in about_fn, each through one kind of readme, and none through a readme read from the head being browsed. --- tests/t0303-robustness.sh | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'tests/t0303-robustness.sh') diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 0bb402f..66f6c5a 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -259,27 +259,6 @@ test_expect_success 'a commit encoding header is read without its newline' ' grep "
caf$(printf "\303\251")<" tmp ' -# The about page shows the readme alone and its links lead into the tree, -# so a path below it names nothing, the site about page included. -test_expect_success 'a path below the about page answers 404' ' - mkrepo repos/about 3 && - ( - cd repos/about && - git update-index --add --cacheinfo 160000,$(git rev-parse HEAD~1),sub && - git commit -m gitlink - ) && - cgitrc_repo aboutrc about mimetype.png=image/png repo.readme=master:file-1 && - for path in sub sub/ missing.png file-1 ../aboutrc - do - cgit_rc aboutrc "url=about/about/$path" >tmp 2>err && - expect_status 404 tmp && - grep "^Content-Type: text/html" tmp && - ! grep fatal err || return 1 - done && - cgit_rc aboutrc "p=about&path=x" >tmp && - expect_status 404 tmp -' - test_expect_success 'a path opening with a colon is refused on the log and patch pages' ' cgit_rc robrc "url=rob/log/:%25x" >tmp && expect_status 400 tmp && @@ -491,17 +470,6 @@ test_expect_success NO_VALGRIND 'a snapshot format whose compressor is missing a expect_status 500 tmp ' -test_expect_success 'a disk readme in the repository directory serves no sibling' ' - mkrepo repos/disk 1 && - echo hello >repos/disk/.git/README && - cgitrc_repo diskrc disk repo.readme=README && - cgit_rc diskrc "url=disk/about/" >tmp && - grep "hello" tmp && - cgit_rc diskrc "url=disk/about/config" >tmp && - expect_status 404 tmp && - ! grep "repositoryformatversion" tmp -' - test_expect_success 'a tag pointing at a tag links the inner tag by id' ' git -C repos/tagged tag -a -m outer outer ann && inner=$(git -C repos/tagged rev-parse ann) && -- cgit 2.12.1