Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Test the branch and tag labels in the log
No test anywhere drew a label, so the peel that tells an annotated tag
from a lightweight one had no check.
| -rwxr-xr-x | tests/t0103-log.sh | 15 |
1 file changed, 15 insertions, 0 deletions
diff --git a/tests/t0103-log.sh b/tests/t0103-log.sh index 8cab0f5..6284684 100755 --- a/tests/t0103-log.sh +++ b/tests/t0103-log.sh @@ -85,6 +85,21 @@ test_expect_success 'a search matching nothing says so' ' test_grep ! "No commits match" tmp ' +# A tag's label says which kind it is, which only peeling the tag tells, and +# a branch label leads to that branch's log. +test_expect_success 'the log labels branches and both kinds of tag' ' + mkrepo repos/deco 3 && + git -C repos/deco branch side HEAD~1 && + git -C repos/deco tag deco-light HEAD~1 && + git -C repos/deco tag -a -m annotated deco-annotated HEAD~2 && + cgitrc_repo decorc deco && + cgit_ok decorc "url=deco/log/" >tmp && + test_grep "<a class=.branch-deco. href=./deco/log/.>master</a>" tmp && + test_grep "<a class=.branch-deco. href=./deco/log/?h=side.>side</a>" tmp && + test_grep "<a class=.tag-deco. href=./deco/tag/?h=deco-light.>deco-light</a>" tmp && + test_grep "<a class=.tag-annotated-deco. href=./deco/tag/?h=deco-annotated.>deco-annotated</a>" tmp +' + # Following a file diffs each commit for the name the file had there, so the # root commit that created it has to be diffed too, and paging has to go on # asking about the name the visitor followed rather than the older one. |
