Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Test a word in a scanned repository's cgitrc
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0205-config.sh | 14 |
1 file changed, 14 insertions, 0 deletions
diff --git a/tests/t0205-config.sh b/tests/t0205-config.sh index 88a271f..8999497 100755 --- a/tests/t0205-config.sh +++ b/tests/t0205-config.sh @@ -223,6 +223,20 @@ test_expect_success 'a word in a scanned git config is reported' ' test_grep -F "Reading hide=true in $PWD/wordscan/foo.git/config line $line as 0, since it is not a whole number" err ' +test_expect_success 'a word in a scanned cgitrc is reported' ' + git clone -q --bare repos/foo/.git wordrcscan/foo.git && + printf "%s\n" "# set by the owner" "desc=scanned" "hide=yes" >wordrcscan/foo.git/cgitrc && + { + echo "virtual-root=/" && + echo "cache-size=0" && + echo "scan-path=$PWD/wordrcscan" + } >wordrcscanrc && + cgit_rc wordrcscanrc "url=" >tmp 2>err && + grep ">foo.git</a>" tmp && + test_grep -F "Reading hide=yes in $PWD/wordrcscan/foo.git/cgitrc line 3 as 0, since it is not a whole number" err && + test_line_count = 1 err +' + # A snapshot format name that matches nothing used to drop out without a # word, so a typo read like a format left off on purpose. The legacy 0 for # none stays quiet, and a leading number other than 0 still means tar alone. |
