#!/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' CGIT_TEST_NO_CREATE_REPOS=YesPlease . ./setup.sh # The site gets a title of its own, as a page that wrote the default out as # a fixed string would otherwise pass for one that read root-title. site=Example 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 ) && old=$(git -C repos/hooks rev-parse HEAD~1 | cut -c1-10) && cgitrc_repo hooksrc hooks enable-blame=1 max-stats=year readme=:file-1 \ "root-title=$site" ' test_expect_success 'the root names the page and the repository' ' cgit_rc hooksrc "url=" >tmp && grep "
" tmp && cgit_rc hooksrc "url=hooks/log/" >tmp && grep "
" tmp ' test_expect_success 'the landmarks and the search form are in place' ' cgit_ok hooksrc "url=hooks/log/" >tmp && grep "
" tmp && grep "