From 0f7e60b2e6cadaff2bf2b63d122bbc65ed72d03d Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 16 Oct 2026 18:14:14 -1000 Subject: Say which filters get the repository variables --- tests/t0201-filters.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/t0201-filters.sh') diff --git a/tests/t0201-filters.sh b/tests/t0201-filters.sh index c6b23af..07db677 100755 --- a/tests/t0201-filters.sh +++ b/tests/t0201-filters.sh @@ -87,6 +87,18 @@ test_expect_success 'the site readme leaves the tree url empty' ' grep "root.txt SITE" tmp ' +test_expect_success 'only a repository page hands filters its variables' ' + write_script env.sh <<-\EOF && + cat >/dev/null + echo "repo url: $CGIT_REPO_URL." + EOF + sed "s|^about-filter=.*|about-filter=exec:$PWD/env.sh|" aboutargsrc >envrc && + CGIT_CONFIG="$PWD/envrc" QUERY_STRING="url=filtered/about/" cgit >tmp && + grep "repo url: filtered\." tmp && + CGIT_CONFIG="$PWD/envrc" QUERY_STRING="p=about" cgit >tmp && + grep "repo url: \." tmp +' + test "$CGIT_HAS_LUA" -eq 1 && test_set_prereq CGIT_LUA test "$CGIT_HAS_LUA" -eq 1 || say 'cgit built without lua, error page check skipped' -- cgit