Diff options
| -rwxr-xr-x | tests/t0103-log.sh | 17 |
1 file changed, 17 insertions, 0 deletions
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</a>.*<td class=.col-count.>2</td><td class=.col-count.><span class=.deletions.>-1</span>/<span class=.insertions.>+3</span></td>" tmp +' + # Prints the options of the branch switcher that carry selected. selected_options() { sed -n "/<select name=.h./,/<\/select>/p" "$1" | grep " selected" |
