#!/bin/sh # The log page and its search. The searching checks use the repository whose # name contains a space and a term containing a space, so every link cgit # writes back has to escape the path and the query, which escape differently. test_description='Check content on log page' . ./setup.sh test_expect_success 'the log lists the whole of a short history' ' cgit_ok_url "foo/log" >tmp && test_grep ">commit 1<" tmp && test_grep ">commit 5<" tmp ' test_expect_success 'the first log page holds fifty commits' ' cgit_ok_url "bar/log" >tmp && test_grep ">commit 1<" tmp && 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 "/