Lars Hjemli | b4649fc | 2007-11-11 00:40:58 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
John Keeping | c95cc5e | 2013-04-01 15:09:05 +0100 | [diff] [blame] | 3 | test_description='Check content on log page' |
Lars Hjemli | b4649fc | 2007-11-11 00:40:58 +0100 | [diff] [blame] | 4 | . ./setup.sh |
| 5 | |
John Keeping | c95cc5e | 2013-04-01 15:09:05 +0100 | [diff] [blame] | 6 | test_expect_success 'generate foo/log' 'cgit_url "foo/log" >tmp' |
| 7 | test_expect_success 'find commit 1' 'grep "commit 1" tmp' |
| 8 | test_expect_success 'find commit 5' 'grep "commit 5" tmp' |
Lars Hjemli | b4649fc | 2007-11-11 00:40:58 +0100 | [diff] [blame] | 9 | |
John Keeping | c95cc5e | 2013-04-01 15:09:05 +0100 | [diff] [blame] | 10 | test_expect_success 'generate bar/log' 'cgit_url "bar/log" >tmp' |
| 11 | test_expect_success 'find commit 1' 'grep "commit 1" tmp' |
| 12 | test_expect_success 'find commit 50' 'grep "commit 50" tmp' |
Lars Hjemli | b4649fc | 2007-11-11 00:40:58 +0100 | [diff] [blame] | 13 | |
John Keeping | c95cc5e | 2013-04-01 15:09:05 +0100 | [diff] [blame] | 14 | test_expect_success 'generate "with%20space/log?qt=grep&q=commit+1"' ' |
| 15 | cgit_url "with+space/log&qt=grep&q=commit+1" >tmp |
Lars Hjemli | 084ca50 | 2011-05-22 12:22:56 +0200 | [diff] [blame] | 16 | ' |
John Keeping | c95cc5e | 2013-04-01 15:09:05 +0100 | [diff] [blame] | 17 | test_expect_success 'find commit 1' 'grep "commit 1" tmp' |
| 18 | test_expect_success 'find link with %20 in path' 'grep "/with%20space/log/?qt=grep" tmp' |
| 19 | test_expect_success 'find link with + in arg' 'grep "/log/?qt=grep&q=commit+1" tmp' |
| 20 | test_expect_success 'no links with space in path' '! grep "href=./with space/" tmp' |
| 21 | test_expect_success 'no links with space in arg' '! grep "q=commit 1" tmp' |
| 22 | test_expect_success 'commit 2 is not visible' '! grep "commit 2" tmp' |
Lars Hjemli | 084ca50 | 2011-05-22 12:22:56 +0200 | [diff] [blame] | 23 | |
John Keeping | c95cc5e | 2013-04-01 15:09:05 +0100 | [diff] [blame] | 24 | test_done |