Diff options
Diffstat (limited to 'tests/setup.sh')
| -rwxr-xr-x | tests/setup.sh | 7 |
1 file changed, 6 insertions, 1 deletion
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" } |
