Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Check the reference config changes nothing
| -rwxr-xr-x | tests/t0004-docs.sh | 21 |
1 file changed, 21 insertions, 0 deletions
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 <alone.out >expect && + strip_headers <sample.out >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' ' |
