Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Say when a log search matches nothing
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0103-log.sh | 10 |
1 file changed, 10 insertions, 0 deletions
diff --git a/tests/t0103-log.sh b/tests/t0103-log.sh index 9796394..444db8f 100755 --- a/tests/t0103-log.sh +++ b/tests/t0103-log.sh @@ -45,6 +45,16 @@ test_expect_success 'no links with space in path' '! grep "href=./with space/" t test_expect_success 'no links with space in arg' '! grep "q=commit 1" tmp' test_expect_success 'commit 2 is not visible' '! grep "commit 2" 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' ' + cgit_url "foo/log&qt=grep&q=no+such+commit" >tmp && + grep "^Status: 200" tmp && + grep "<tr class=.nohover.><td colspan=.5.>No commits match the search</td></tr>" tmp && + cgit_url "foo/log&qt=grep&q=commit+1" >tmp && + ! grep "No commits match" tmp +' + # Following a file diffs each commit for the name the file had there, so the # root commit that created it has to be diffed too, and paging has to go on # asking about the name the visitor followed rather than the older one. |
