]> git.cameronkatri.com Git - cgit.git/blob - tests/t0104-tree.sh
git: update to v2.25.0
[cgit.git] / tests / t0104-tree.sh
1 #!/bin/sh
2
3 test_description='Check content on tree page'
4 . ./setup.sh
5
6 test_expect_success 'generate bar/tree' 'cgit_url "bar/tree" >tmp'
7 test_expect_success 'find file-1' 'grep "file-1" tmp'
8 test_expect_success 'find file-50' 'grep "file-50" tmp'
9
10 test_expect_success 'generate bar/tree/file-50' 'cgit_url "bar/tree/file-50" >tmp'
11
12 test_expect_success 'find line 1' '
13 grep "<a id=.n1. href=.#n1.>1</a>" tmp
14 '
15
16 test_expect_success 'no line 2' '
17 ! grep "<a id=.n2. href=.#n2.>2</a>" tmp
18 '
19
20 test_expect_success 'generate foo+bar/tree' 'cgit_url "foo%2bbar/tree" >tmp'
21
22 test_expect_success 'verify a+b link' '
23 grep "/foo+bar/tree/a+b" tmp
24 '
25
26 test_expect_success 'generate foo+bar/tree?h=1+2' 'cgit_url "foo%2bbar/tree&h=1%2b2" >tmp'
27
28 test_expect_success 'verify a+b?h=1+2 link' '
29 grep "/foo+bar/tree/a+b?h=1%2b2" tmp
30 '
31
32 test_done