27
Content-Disposition: inline; filename="
e
t0101-index.sh
HTTP/1.1 200 OK
Connection: close
Content-Length: 492
Content-Security-Policy: default-src 'none'
Content-Type: text/plain; charset=UTF-8
Date: Sun, 22 Jun 2025 12:52:40 GMT
ETag: "445af6a6f0b48a3774c8778f4cbf12c73d88d00e"
Expires: Wed, 20 Jun 2035 12:52:40 GMT
Last-Modified: Sun, 22 Jun 2025 12:52:40 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 'no tree-link' '! grep -e "foo/tree" trash/tmp'
run_test 'no log-link' '! grep -e "foo/log" trash/tmp'

tests_done
