From 8273c8b176e9fc2cb2898b7ee76af2a8558db4ff Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 12 Aug 2026 19:26:32 -1000 Subject: Tidy the test comments and shell portability --- tests/t0202-stats.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'tests/t0202-stats.sh') diff --git a/tests/t0202-stats.sh b/tests/t0202-stats.sh index 1589776..2ada672 100755 --- a/tests/t0202-stats.sh +++ b/tests/t0202-stats.sh @@ -1,9 +1,15 @@ #!/bin/sh +# Checks the per repository statistics page, which stays off until a config +# turns it on and then reports commits per author beside a breakdown of the +# tree by language. A second config caps the period so that what max-stats +# takes out of the period selector is covered as well. + test_description='Check the statistics page' . ./setup.sh -# The default test config carries no enable-stats. +# The shared test config sets no enable-stats, so this is what an untouched +# install does. test_expect_success 'stats are off by default' ' cgit_url "foo/stats" >tmp && grep "Status: 404" tmp && @@ -11,10 +17,11 @@ test_expect_success 'stats are off by default' ' ! grep ">stats" tmp ' -# A repo with one commit dated now, so the authors table has something -# to count beside the 2005-dated fixture commits. The commit graph -# makes the language walk take the graph lookup path, which once -# returned another commit after the history walk released memory. +# The authors table counts only recent periods, so the fixture needs a commit +# dated now to sit beside the 2005 dates the shared repositories carry. The +# commit graph is written on purpose, because it sends the language walk down +# the graph lookup path, which once handed back another commit after the +# history walk had released its memory. test_expect_success 'set up a stats config' ' mkrepo repos/pulse 2 && ( -- cgit v2.8.0