mirror of
https://git.zx2c4.com/cgit
synced 2024-11-23 00:48:42 +00:00
b575115d9d
The link-generating functions are updated to use the new html_url_arg function, thereby fixing links to strange repos, branches and files. Also, the test-suite is updated to verify some cases of strange urls. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 lines
616 B
Bash
Executable File
18 lines
616 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. ./setup.sh
|
|
|
|
prepare_tests "Check content on index page"
|
|
|
|
run_test 'generate index page' 'cgit_url "" >trash/tmp'
|
|
run_test 'find foo repo' 'grep -e "foo" trash/tmp'
|
|
run_test 'find foo description' 'grep -e "\[no description\]" trash/tmp'
|
|
run_test 'find bar repo' 'grep -e "bar" trash/tmp'
|
|
run_test 'find bar description' 'grep -e "the bar repo" trash/tmp'
|
|
run_test 'find foo+bar repo' 'grep -e ">foo+bar<" trash/tmp'
|
|
run_test 'verify foo+bar link' 'grep -e "/foo+bar/" trash/tmp'
|
|
run_test 'no tree-link' '! grep -e "foo/tree" trash/tmp'
|
|
run_test 'no log-link' '! grep -e "foo/log" trash/tmp'
|
|
|
|
tests_done
|