summaryrefslogtreecommitdiff
path: root/tests/t0104-tree.sh
blob: 0d62cc82c5d5dbbc90e351a73e3c748e427ba7c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh

. ./setup.sh

prepare_tests "Check content on tree page"

run_test 'generate bar/tree' 'cgit_url "bar/tree" >trash/tmp'
run_test 'find file-1' 'grep -e "file-1" trash/tmp'
run_test 'find file-50' 'grep -e "file-50" trash/tmp'

run_test 'generate bar/tree/file-50' 'cgit_url "bar/tree/file-50" >trash/tmp'

run_test 'find line 1' '
	grep -e "<a id=.n1. name=.n1. href=.#n1.>1</a>" trash/tmp
'

run_test 'no line 2' '
	grep -e "<a id=.n2. name=.n2. href=.#n2.>2</a>" trash/tmp
'

run_test 'generate foo+bar/tree' 'cgit_url "foo%2bbar/tree" >trash/tmp'

run_test 'verify a+b link' '
	grep -e "/foo+bar/tree/a+b" trash/tmp
'

run_test 'generate foo+bar/tree?h=1+2' 'cgit_url "foo%2bbar/tree&h=1%2b2" >trash/tmp'

run_test 'verify a+b?h=1+2 link' '
	grep -e "/foo+bar/tree/a+b?h=1%2b2" trash/tmp
'

tests_done
wnload.mako?id=6aef919b2d67ef36dc3df816a4ee16f559749636&follow=1'>DownloadRené 'Necoro' Neumann1-1/+1 2010-04-07Development pageRené 'Necoro' Neumann2-2/+51 2010-04-07Menu reorderingRené 'Necoro' Neumann1-2/+2 2010-04-07Screenshot pageRené 'Necoro' Neumann2-0/+7 2010-04-07ForumsRené 'Necoro' Neumann1-0/+6 2010-04-07Some more tocRené 'Necoro' Neumann2-3/+9 2010-04-07Use 'Found' instead of 'Redirect'René 'Necoro' Neumann1-1/+1 2010-04-07Sanitized JSRené 'Necoro' Neumann2-15/+14 2010-04-07Fixed CSS; added stuff for TOCRené 'Necoro' Neumann1-8/+19 2010-04-07Renamed 'menu' to the correct 'toc'René 'Necoro' Neumann2-8/+8 2010-04-07Default argument for 404René 'Necoro' Neumann1-1/+1 2010-04-07Javascript to generate TOCsRené 'Necoro' Neumann4-1/+63