27
Content-Disposition: inline; filename="
e
t0101-index.sh
HTTP/1.1 200 OK
Connection: close
Content-Length: 691
Content-Security-Policy: default-src 'none'
Content-Type: text/plain; charset=UTF-8
Date: Thu, 19 Feb 2026 11:40:22 GMT
ETag: "573a351b8078193563f26f22888b6f1a90f7ab78"
Expires: Sun, 17 Feb 2036 11:40:22 GMT
Last-Modified: Thu, 19 Feb 2026 11:40:22 GMT
Server: OpenBSD httpd
X-Content-Type-Options: nosniff

#!/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 'verify "with%20space" link' 'grep -e "/with%20space/" 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
