Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Test a number left empty in cgitrc
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0205-config.sh | 9 |
1 file changed, 9 insertions, 0 deletions
diff --git a/tests/t0205-config.sh b/tests/t0205-config.sh index 8999497..5931f4c 100755 --- a/tests/t0205-config.sh +++ b/tests/t0205-config.sh @@ -208,6 +208,15 @@ test_expect_success 'a word where a number belongs is reported' ' test_grep -F "Reading enable-blame=on in $PWD/outerrc line 2 as 0, since it is not a whole number" err ' +# A number left empty reads as 0 as well, so it is logged as a word is. +test_expect_success 'an empty number is reported' ' + cgitrc_repo emptyrc foo cache-size= && + cgit_rc emptyrc "url=foo/" >tmp 2>err && + test_grep "^Status: 200" tmp && + test_grep -F "Reading cache-size= in $PWD/emptyrc line 3 as 0, since it is not a whole number" err && + test_line_count = 1 err +' + test_expect_success 'a word in a scanned git config is reported' ' git clone -q --bare repos/foo/.git wordscan/foo.git && git -C wordscan/foo.git config cgit.hide true && |
