Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Test the log search by case and by committer
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0103-log.sh | 19 |
1 file changed, 19 insertions, 0 deletions
diff --git a/tests/t0103-log.sh b/tests/t0103-log.sh index ca7c188..9309b10 100755 --- a/tests/t0103-log.sh +++ b/tests/t0103-log.sh @@ -133,6 +133,25 @@ test_expect_success 'a search lists only the commits it matches' ' test_grep ! "commit 2" tmp ' +test_expect_success 'a search ignores case' ' + cgit_ok_url "foo/log&qt=grep&q=COMMIT+1" >tmp && + test_grep ">commit 1<" tmp && + test_grep ! ">commit 2<" tmp +' + +# The commit below has a committer of its own, which an author search does +# not see. +test_expect_success 'a committer search matches the committer' ' + mkrepo repos/who 1 && + GIT_COMMITTER_NAME="Other Committer" git -C repos/who commit --allow-empty -m "by other" && + cgitrc_repo whorc who && + cgit_ok whorc "url=who/log/&qt=committer&q=other" >tmp && + test_grep ">by other<" tmp && + test_grep ! ">commit 1<" tmp && + cgit_ok whorc "url=who/log/&qt=author&q=other" >tmp && + test_grep "No commits match the search" tmp +' + # A search that matches nothing says so in a row of its own, rather than # leaving the table a header with nothing under it. test_expect_success 'a search matching nothing says so' ' |
