diff options
context:
space:
mode:
Diffstat (limited to 'tests/t0113-tag.sh')
-rwxr-xr-xtests/t0113-tag.sh28
1 file changed, 15 insertions, 13 deletions
diff --git a/tests/t0113-tag.sh b/tests/t0113-tag.sh
index 12ad1b4..90763bd 100755
--- a/tests/t0113-tag.sh
+++ b/tests/t0113-tag.sh
@@ -1,9 +1,9 @@
#!/bin/sh
-# The tag page. An annotated tag gets the same three column table as the
-# commit page, with the tagger and date on one row and the tag, object and
-# download rows spanning the rest, and its message follows with no blank
-# line between subject and body. A lightweight tag gets the shorter table.
+# The tag page. An annotated tag gets a table of its name, date, tagger, the
+# object it points at under its full id, and the downloads, and its message
+# follows with no blank line between subject and body. A lightweight tag gets
+# the shorter table.
test_description='Check content on tag page'
. ./setup.sh
@@ -21,14 +21,16 @@ two lines." v1.0 &&
test_expect_success 'generate foo/tag/?h=v1.0' 'cgit_url "foo/tag/&h=v1.0" >tmp'
-test_expect_success 'find the tagger row with its date' '
- grep "<tr><th>tagger</th><td>C O Mitter &lt;committer@example.com&gt;</td><td class=.right.><time datetime=" tmp
+test_expect_success 'find the name, date and tagger rows' '
+ grep "<tr><th>tag name</th><td>v1.0 (<span class=.oid.>[0-9a-f]*</span>)</td></tr>" tmp &&
+ grep "<tr><th>tag date</th><td><time datetime=" tmp &&
+ grep "<tr><th>tagged by</th><td>C O Mitter &lt;committer@example.com&gt;</td></tr>" tmp
'
-test_expect_success 'find the tag, object and download rows' '
- grep "<tr><th>tag</th><td colspan=.2.>v1.0 (<span class=.oid.>[0-9a-f]*</span>)</td></tr>" tmp &&
- grep "<tr><th>object</th><td colspan=.2. class=.oid.><a" tmp &&
- grep "<tr><th>download</th><td colspan=.2. class=.oid.>" tmp
+test_expect_success 'the object row names the full commit id' '
+ commit=$(git -C repos/foo rev-parse v1.0^{commit}) &&
+ grep "<tr><th>tagged object</th><td class=.oid.><a href=./foo/commit/?h=v1.0&amp;id=$commit.>commit $commit</a></td></tr>" tmp &&
+ grep "<tr><th>download</th><td class=.oid.>" tmp
'
test_expect_success 'the message follows with no blank line before the body' '
@@ -38,9 +40,9 @@ test_expect_success 'the message follows with no blank line before the body' '
test_expect_success 'a lightweight tag gets the shorter table' '
cgit_url "foo/tag/&h=light" >tmp &&
- grep "<tr><th>tag</th><td colspan=.2.>light</td></tr>" tmp &&
- grep "<tr><th>object</th><td colspan=.2. class=.oid.><a" tmp &&
- ! grep "<th>tagger</th>" tmp
+ grep "<tr><th>tag name</th><td>light</td></tr>" tmp &&
+ grep "<tr><th>tagged object</th><td class=.oid.><a" tmp &&
+ ! grep "<th>tagged by</th>" tmp
'
test_done