X-Git-Url: https://git.cameronkatri.com/cgit.git/blobdiff_plain/a7cf406c802394460cb14c79f3f43582d1428a45..a96f2890f41e0b9b0ffa1bcdb1dddbef28c01662:/tests/t0101-index.sh diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh index 12ed00c..82ef9b0 100755 --- a/tests/t0101-index.sh +++ b/tests/t0101-index.sh @@ -1,13 +1,17 @@ #!/bin/sh +test_description='Check content on index page' . ./setup.sh -prepare_tests "Check content on index page" +test_expect_success 'generate index page' 'cgit_url "" >tmp' +test_expect_success 'find foo repo' 'grep "foo" tmp' +test_expect_success 'find foo description' 'grep "\[no description\]" tmp' +test_expect_success 'find bar repo' 'grep "bar" tmp' +test_expect_success 'find bar description' 'grep "the bar repo" tmp' +test_expect_success 'find foo+bar repo' 'grep ">foo+bar<" tmp' +test_expect_success 'verify foo+bar link' 'grep "/foo+bar/" tmp' +test_expect_success 'verify "with%20space" link' 'grep "/with%20space/" tmp' +test_expect_success 'no tree-link' '! grep "foo/tree" tmp' +test_expect_success 'no log-link' '! grep "foo/log" tmp' -run_test 'generate index page' 'cgit_url "" >trash/tmp' -run_test 'find foo repo' 'grep -e "foo" trash/tmp' -run_test 'find bar repo' 'grep -e "bar" trash/tmp' -run_test 'no tree-link' 'grep -ve "foo/tree" trash/tmp' -run_test 'no log-link' 'grep -ve "foo/log" trash/tmp' - -tests_done +test_done