all repos — cgit @ 392e07d28a23aec9942b9ed0d122e35d2d268fb9

a hyperfast web frontend for git written in c

tests/t0103-log.sh (view raw)

 1#!/bin/sh
 2
 3. ./setup.sh
 4
 5prepare_tests "Check content on log page"
 6
 7run_test 'generate foo/log' 'cgit_url "foo/log" >trash/tmp'
 8run_test 'find commit 1' 'grep "commit 1" trash/tmp'
 9run_test 'find commit 5' 'grep "commit 5" trash/tmp'
10
11run_test 'generate bar/log' 'cgit_url "bar/log" >trash/tmp'
12run_test 'find commit 1' 'grep "commit 1" trash/tmp'
13run_test 'find commit 50' 'grep "commit 50" trash/tmp'
14
15run_test 'generate "with%20space/log?qt=grep&q=commit+1"' '
16	cgit_url "with+space/log&qt=grep&q=commit+1" >trash/tmp
17'
18run_test 'find commit 1' 'grep "commit 1" trash/tmp'
19run_test 'find link with %20 in path' 'grep "/with%20space/log/?qt=grep" trash/tmp'
20run_test 'find link with + in arg' 'grep "/log/?qt=grep&q=commit+1" trash/tmp'
21run_test 'no links with space in path' '! grep "href=./with space/" trash/tmp'
22run_test 'no links with space in arg' '! grep "q=commit 1" trash/tmp'
23run_test 'commit 2 is not visible' '! grep "commit 2" trash/tmp'
24
25tests_done