diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0204-limits.sh | 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 20 insertions, 0 deletions
diff --git a/tests/t0204-limits.sh b/tests/t0204-limits.sh index 245c016..b1c797a 100755 --- a/tests/t0204-limits.sh +++ b/tests/t0204-limits.sh @@ -105,6 +105,26 @@ test_expect_success 'tag page paginates independently' ' ! grep "log/?h=" tmp ' +# A count of 0 lists every ref, and a negative one has to mean the same +# rather than reach the sort as a size. +test_expect_success 'a negative ref count lists every ref' ' + for n in 0 -1 + do + { + echo "summary-branches=$n" && + echo "summary-tags=$n" && + sed "s/^max-ref-count=2$/max-ref-count=$n/" limitrc + } >count$n.rc && + CGIT_CONFIG="$PWD/count$n.rc" QUERY_STRING="url=limits/refs/" cgit >refs$n && + CGIT_CONFIG="$PWD/count$n.rc" QUERY_STRING="url=limits/" cgit >summary$n || + return 1 + done && + grep "log/?h=branch-3" refs0 && + grep "/tag/?h=tag-3" summary0 && + test_cmp refs0 refs-1 && + test_cmp summary0 summary-1 +' + # A file that busts max-diff-lines is replaced by a link to its own page, # where the reader asked for that one file and the limit no longer applies. # The rest of the commit still renders, so one huge file cannot hide the |
