From bfe5e738e6a70f9958aebf16d37ce6eea7583dd1 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 08:19:33 -1000 Subject: Correct the comments on the test plumbing cgit_rc keeps its name, close as it is to cgitrc_repo and cgitrc_copy, since every script calls it, so a comment now says what it runs. --- tests/setup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/setup.sh') diff --git a/tests/setup.sh b/tests/setup.sh index d69fce7..d631197 100755 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -45,7 +45,7 @@ TEST_OUTPUT_DIRECTORY=$(pwd) GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME # The library would otherwise leave a repository of its own in the trash -# directory, and every repository these tests want is built by mkrepo below. +# directory, and the tests build the repositories they want themselves. TEST_NO_CREATE_REPO=YesPlease . "$TEST_DIRECTORY"/test-lib.sh @@ -247,10 +247,15 @@ cgitrc_copy() { } >"$cgitrc_file" } +# Runs cgit on the config file named first for the query string named second, +# passing on its output and its exit status, which is 0 for an error page too. cgit_rc() { CGIT_CONFIG="$PWD/$1" QUERY_STRING="$2" cgit } +# These two ask the shared config, which keeps each page in a cache keyed on +# the request alone. A test that changes a repository and asks again for a page +# fetched before gets the old copy back, unless it uses cgit_ok_url. cgit_query() { cgit_rc cgitrc "$1" } -- cgit 2.12.1