#!/bin/sh # Guards the hooks the README promises a site stylesheet or script, so a # rename in the markup fails here instead of in someone's theme. Each check # names the page it renders and the attribute or element it expects. test_description='Check the markup hooks a theme relies on' . ./setup.sh test_expect_success 'set up a repository with a file that has an extension' ' mkrepo repos/hooks 2 && ( cd repos/hooks && mkdir dir && echo "int x;" >dir/hello.c && git add dir && git commit -m sources ) && { echo "virtual-root=/" && echo "cache-size=0" && echo "enable-blame=1" && echo "max-stats=year" && echo "readme=:file-1" && echo "repo.url=hooks" && echo "repo.path=$PWD/repos/hooks/.git" } >hooksrc ' hooks() { CGIT_CONFIG="$PWD/hooksrc" QUERY_STRING="url=$1" cgit; } test_expect_success 'the root names the page and the repository' ' hooks "" >tmp && grep "