Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Offer the versions as an option
enable-version-info brings back the cgit and git versions that 3a00e19
took off the footer and the generator tag, for a site that wants them,
and the version 2a6726a put on the signature of patches now follows it
too. It stays off by default for the reason 3a00e19 gave.
Diffstat (limited to 'tests/t0005-markup.sh')
| -rwxr-xr-x | tests/t0005-markup.sh | 22 |
1 file changed, 22 insertions, 0 deletions
diff --git a/tests/t0005-markup.sh b/tests/t0005-markup.sh index 52d9e34..5fa866d 100755 --- a/tests/t0005-markup.sh +++ b/tests/t0005-markup.sh @@ -44,6 +44,28 @@ test_expect_success 'the landmarks and the search form are in place' ' grep "<footer class=.footer.>" tmp ' +test_expect_success 'the pages name the versions only when asked to' ' + hooks "hooks/" >footer && + grep "<meta name=.generator. content=.cgit.>" footer && + grep "<footer class=.footer.>generated by <a href=[^>]*>cgit</a></footer>" footer && + { + echo "enable-version-info=1" && + cat hooksrc + } >versionrc && + CGIT_CONFIG="$PWD/versionrc" QUERY_STRING="url=hooks/" cgit >footer && + grep "<meta name=.generator. content=.cgit v[0-9][^>]*>" footer && + grep "<footer class=.footer.>generated by <a href=[^>]*>cgit v[0-9][^<]*</a> (<a href=[^>]*>git [0-9][^<]*</a>)</footer>" footer && + echo "<footer>our own</footer>" >footer.html && + { + echo "enable-version-info=1" && + echo "footer=$PWD/footer.html" && + cat hooksrc + } >versionrc && + CGIT_CONFIG="$PWD/versionrc" QUERY_STRING="url=hooks/" cgit >footer && + grep "<footer>our own</footer>" footer && + ! grep "git-scm" footer +' + test_expect_success 'the listings name themselves, their sections and their rows' ' grep "<table class=.list log. aria-label=.Commits.>" tmp && grep "<tbody class=.log.>" tmp && |
