blob: bdf1435a16fe132e70a89fce6ee16f8182f03ba8 [file] [log] [blame]
Lars Hjemlib4649fc2007-11-11 00:40:58 +01001#!/bin/sh
2
John Keepingc95cc5e2013-04-01 15:09:05 +01003test_description='Check content on log page'
Lars Hjemlib4649fc2007-11-11 00:40:58 +01004. ./setup.sh
5
John Keepingc95cc5e2013-04-01 15:09:05 +01006test_expect_success 'generate foo/log' 'cgit_url "foo/log" >tmp'
7test_expect_success 'find commit 1' 'grep "commit 1" tmp'
8test_expect_success 'find commit 5' 'grep "commit 5" tmp'
Lars Hjemlib4649fc2007-11-11 00:40:58 +01009
John Keepingc95cc5e2013-04-01 15:09:05 +010010test_expect_success 'generate bar/log' 'cgit_url "bar/log" >tmp'
11test_expect_success 'find commit 1' 'grep "commit 1" tmp'
12test_expect_success 'find commit 50' 'grep "commit 50" tmp'
Lars Hjemlib4649fc2007-11-11 00:40:58 +010013
John Keepingc95cc5e2013-04-01 15:09:05 +010014test_expect_success 'generate "with%20space/log?qt=grep&q=commit+1"' '
15 cgit_url "with+space/log&qt=grep&q=commit+1" >tmp
Lars Hjemli084ca502011-05-22 12:22:56 +020016'
John Keepingc95cc5e2013-04-01 15:09:05 +010017test_expect_success 'find commit 1' 'grep "commit 1" tmp'
18test_expect_success 'find link with %20 in path' 'grep "/with%20space/log/?qt=grep" tmp'
19test_expect_success 'find link with + in arg' 'grep "/log/?qt=grep&q=commit+1" tmp'
20test_expect_success 'no links with space in path' '! grep "href=./with space/" tmp'
21test_expect_success 'no links with space in arg' '! grep "q=commit 1" tmp'
22test_expect_success 'commit 2 is not visible' '! grep "commit 2" tmp'
Lars Hjemli084ca502011-05-22 12:22:56 +020023
John Keepingc95cc5e2013-04-01 15:09:05 +010024test_done