Diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0003-cache.sh | 12 |
1 file changed, 12 insertions, 0 deletions
diff --git a/tests/t0003-cache.sh b/tests/t0003-cache.sh index 0504c88..53a6d5b 100755 --- a/tests/t0003-cache.sh +++ b/tests/t0003-cache.sh @@ -455,6 +455,18 @@ test_expect_success 'a negative cache-scan-ttl never expires the list' ' ! grep "^repo.url=kept$" "cache5/$scanned_rc" ' +# A repository the scan found without a description goes into the list +# without one, so its pages do not describe themselves with the placeholder. +test_expect_success 'a cached scan leaves the description placeholder out' ' + rm -rf cache5 && mkdir cache5 && + cgit_rc scanrc "url=" >/dev/null && + ! grep "^repo.desc=" cache5/rc-* && + cgit_rc scanrc "url=" >tmp && + grep "\[no description\]" tmp && + cgit_rc scanrc "url=one/" >tmp && + ! grep "<meta name=.description." tmp +' + # A cache-size below zero turns the page cache off, and the scan with it, so # the cache directory stays empty. test_expect_success 'a negative cache-size leaves the scan uncached' ' |
