Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Name a pinned commit with the page in the title
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0005-markup.sh | 13 |
1 file changed, 13 insertions, 0 deletions
diff --git a/tests/t0005-markup.sh b/tests/t0005-markup.sh index cf9143b..064e74d 100755 --- a/tests/t0005-markup.sh +++ b/tests/t0005-markup.sh @@ -118,6 +118,19 @@ test_expect_success 'each page names itself, then the repository and the site' ' grep "<title>blame - hello.c < dir - hooks - $site</title>" tmp ' +# A commit the page is pinned to belongs with the page's own name, or with the +# repository's on the summary, which has no name of its own. +test_expect_success 'a pinned page names its commit before the repository' ' + site="Git repository browser" && + old=$(git -C repos/hooks rev-parse HEAD~1 | cut -c1-10) && + cgit_rc hooksrc "url=hooks/tree/&id=$old" >tmp && + grep "<title>tree @ $old - hooks - $site</title>" tmp && + cgit_rc hooksrc "url=hooks/commit/&id=$old" >tmp && + grep "<title>commit 2 @ $old - hooks - $site</title>" tmp && + cgit_rc hooksrc "url=hooks/&id=$old" >tmp && + grep "<title>hooks @ $old - $site</title>" tmp +' + # The logo is all its link holds, so it is named for where the link leads, # which by default is the site's index. test_expect_success 'the logo is named after the site' ' |
