Diff options
Diffstat (limited to 'tests')
-rwxr-xr-xtests/t0005-markup.sh15
-rwxr-xr-xtests/t0113-tag.sh5
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/t0005-markup.sh b/tests/t0005-markup.sh
index 22ac81c..52d9e34 100755
--- a/tests/t0005-markup.sh
+++ b/tests/t0005-markup.sh
@@ -90,6 +90,21 @@ test_expect_success 'the blob, blame and about pages open with their own contain
grep "<div id=.about.>" tmp
'
+test_expect_success 'each page names itself, then the repository and the site' '
+ site="Git repository browser" &&
+ hooks "hooks/" >tmp &&
+ grep "<title>hooks - $site</title>" tmp &&
+ for page in about log refs tree stats
+ do
+ hooks "hooks/$page/" >tmp &&
+ grep "<title>$page - hooks - $site</title>" tmp || return 1
+ done &&
+ hooks "hooks/tree/dir/hello.c" >tmp &&
+ grep "<title>hello.c &lt; dir - hooks - $site</title>" tmp &&
+ hooks "hooks/blame/dir/hello.c" >tmp &&
+ grep "<title>blame - hello.c &lt; dir - hooks - $site</title>" tmp
+'
+
# A browser gives these elements a monospace font of its own, which would
# otherwise win over the one a theme sets through --font-mono.
test_expect_success 'every monospace element takes the theme font' '
diff --git a/tests/t0113-tag.sh b/tests/t0113-tag.sh
index b91c7e6..2043385 100755
--- a/tests/t0113-tag.sh
+++ b/tests/t0113-tag.sh
@@ -86,4 +86,9 @@ test_expect_success 'a signed tag shows its signature in the message' '
! grep "<details" tmp
'
+test_expect_success 'a tag page names the tag in its title' '
+ cgit_url "foo/tag/&h=v1.0" >tmp &&
+ grep "<title>v1.0 - foo - Git repository browser</title>" tmp
+'
+
test_done