From dece4ef9b74680e8a1f56365d179bd6eeb8adba2 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 11:53:37 -1000 Subject: Test the file and line counts in the log The shared config turns both columns on, but no test read a count, so a wrong or swapped one passed. --- tests/t0103-log.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') diff --git a/tests/t0103-log.sh b/tests/t0103-log.sh index 6284684..d920737 100755 --- a/tests/t0103-log.sh +++ b/tests/t0103-log.sh @@ -19,6 +19,23 @@ test_expect_success 'the first log page holds fifty commits' ' test_grep ">commit 50<" tmp ' +test_expect_success 'the log counts the files and lines a commit changed' ' + test_create_repo repos/counts && + ( + cd repos/counts && + printf "1\n2\n3\n" >a.txt && + git add a.txt && + git commit -m "add a" && + printf "1\n3\n4\n5\n" >a.txt && + echo x >b.txt && + git add a.txt b.txt && + git commit -m "change both" + ) && + cgitrc_repo countsrc counts enable-log-filecount=1 enable-log-linecount=1 && + cgit_ok countsrc "url=counts/log/" >tmp && + test_grep ">change both.*2-1/+3" tmp +' + # Prints the options of the branch switcher that carry selected. selected_options() { sed -n "/