From 6ca4917064c1982651f31793929b2cab7700a6f1 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 17:17:29 -1000 Subject: Check the reference config changes nothing --- tests/t0004-docs.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests') diff --git a/tests/t0004-docs.sh b/tests/t0004-docs.sh index 2c0b614..339f50c 100755 --- a/tests/t0004-docs.sh +++ b/tests/t0004-docs.sh @@ -69,6 +69,27 @@ test_expect_success 'the manual documents every key cgit accepts' ' test_must_be_empty undocumented ' +# The sample says that copied as-is it leaves cgit as if nothing were set, so +# a repository listed after it renders the same as one listed alone, and +# nothing in it is logged. +test_expect_success 'the reference config changes nothing as it ships' ' + mkrepo repos/sample 1 >/dev/null && + { + echo "repo.url=sample" && + echo "repo.path=$PWD/repos/sample/.git" + } >alonerc && + cat "$ROOT/custom/cgitrc" alonerc >samplerc && + for url in "" sample/ sample/log/ + do + cgit_ok alonerc "url=$url" >alone.out && + cgit_ok samplerc "url=$url" >sample.out && + strip_headers expect && + strip_headers actual && + test_grep "data-page=" actual && + test_cmp expect actual || return 1 + done +' + # A scanned repository inherits the global settings above scan-path, so the # sample keeps none below it. test_expect_success 'the reference config scans after every global setting' ' -- cgit 2.12.1