tests/t0103-log.sh (view raw)
1#!/bin/sh
2
3test_description='Check content on log page'
4. ./setup.sh
5
6test_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'
9
10test_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'
13
14test_expect_success 'generate "with%20space/log?qt=grep&q=commit+1"' '
15 cgit_url "with+space/log&qt=grep&q=commit+1" >tmp
16'
17test_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'
23
24test_done