Skip to content

Commit 3badf55

Browse files
authored
test: Improve cref tests (#747)
1 parent 6e64a1c commit 3badf55

16 files changed

+107
-38
lines changed

tests/input/draft-v3-features.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@
166166
<cref display="false">Comment not shown</cref>
167167
</t>
168168
</section>
169+
<section anchor="titlecref">
170+
<name>Test: Comment</name>
171+
<t>
172+
<cref anchor="titlecrefid">cref</cref>
173+
Text after comment
174+
<t>More text after comment</t>
175+
</t>
176+
</section>
169177
</section>
170178
<section>
171179
<name>Renaming References</name>

tests/valid/docfile.py36.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<thead><tr>
2525
<td class="left"></td>
2626
<td class="center">Xml2rfc Vocabulary V3 Schema</td>
27-
<td class="right">February 2022</td>
27+
<td class="right">March 2022</td>
2828
</tr></thead>
2929
<tfoot><tr>
3030
<td class="left">xml2rfc(1)</td>

tests/valid/docfile.py37.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<thead><tr>
2525
<td class="left"></td>
2626
<td class="center">Xml2rfc Vocabulary V3 Schema</td>
27-
<td class="right">February 2022</td>
27+
<td class="right">March 2022</td>
2828
</tr></thead>
2929
<tfoot><tr>
3030
<td class="left">xml2rfc(1)</td>

tests/valid/docfile.py38.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<thead><tr>
2525
<td class="left"></td>
2626
<td class="center">Xml2rfc Vocabulary V3 Schema</td>
27-
<td class="right">February 2022</td>
27+
<td class="right">March 2022</td>
2828
</tr></thead>
2929
<tfoot><tr>
3030
<td class="left">xml2rfc(1)</td>

tests/valid/draft-v3-features.prepped.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<rfc version="3" category="exp" docName="draft-v3-features" indexInclude="true" ipr="trust200902" prepTime="2021-04-30T01:55:44" scripts="Cherokee,Common,Cyrillic,Greek,Latin" sortRefs="true" submissionType="independent" symRefs="true" tocDepth="3" tocInclude="true">
3-
<!-- xml2rfc v2v3 conversion 3.7.0 -->
2+
<rfc version="3" category="exp" docName="draft-v3-features" indexInclude="true" ipr="trust200902" prepTime="2022-03-11T03:07:05" scripts="Cherokee,Common,Cyrillic,Greek,Latin" sortRefs="true" submissionType="independent" symRefs="true" tocDepth="3" tocInclude="true">
3+
<!-- xml2rfc v2v3 conversion 3.12.3 -->
44

55

66

@@ -138,6 +138,9 @@
138138
<li pn="section-toc.1-1.2.2.3">
139139
<t indent="0" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-title-with-id">Title with id</xref></t>
140140
</li>
141+
<li pn="section-toc.1-1.2.2.4">
142+
<t indent="0" pn="section-toc.1-1.2.2.4.1"><xref derivedContent="2.4" format="counter" sectionFormat="of" target="section-2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-comment">Test: Comment</xref></t>
143+
</li>
141144
</ul>
142145
</li>
143146
<li pn="section-toc.1-1.3">
@@ -402,6 +405,14 @@
402405
<cref display="false">Comment not shown</cref>
403406
</t>
404407
</section>
408+
<section anchor="titlecref" numbered="true" removeInRFC="false" toc="include" pn="section-2.4">
409+
<name slugifiedName="name-test-comment">Test: Comment</name>
410+
<t indent="0" pn="section-2.4-1">
411+
<cref anchor="titlecrefid" display="true">cref</cref>
412+
Text after comment
413+
</t>
414+
<t indent="0" pn="section-2.4-2">More text after comment</t>
415+
</section>
405416
</section>
406417
<section numbered="true" removeInRFC="false" toc="include" pn="section-3">
407418
<name slugifiedName="name-renaming-references">Renaming References</name>

tests/valid/draft-v3-features.text

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Table of Contents
9191
2.1. Title in <name> element, including markup
9292
2.2. Title with xref: Section 2.2
9393
2.3. Title with id
94+
2.4. Test: Comment
9495
3. Renaming References
9596
4. Lists
9697
4.1. Definition Lists
@@ -191,6 +192,13 @@ Table of Contents
191192

192193
Test: a reference to the comment (Comment titleidid).
193194

195+
2.4. Test: Comment
196+
197+
198+
// cref Text after comment
199+
200+
More text after comment
201+
194202
3. Renaming References
195203

196204
Test: [0REFTEST].

tests/valid/draft-v3-features.v3.py36.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
This document tests features introduced in xml2rfc v3 vocabulary.
1313
1414
" name="description">
15-
<meta content="xml2rfc 3.9.1" name="generator">
15+
<meta content="xml2rfc 3.12.3" name="generator">
1616
<meta content="draft-v3-features" name="ietf.draft">
1717
<link href="tests/input/draft-v3-features.xml" rel="alternate" type="application/rfc+xml">
1818
<link href="#copyright" rel="license">
@@ -175,6 +175,9 @@ <h2 id="name-copyright-notice">
175175
</li>
176176
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.3">
177177
<p id="section-toc.1-1.2.2.3.1"><a href="#section-2.3" class="xref">2.3</a>.  <a href="#name-title-with-id" class="xref">Title with id</a></p>
178+
</li>
179+
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.4">
180+
<p id="section-toc.1-1.2.2.4.1"><a href="#section-2.4" class="xref">2.4</a>.  <a href="#name-test-comment" class="xref">Test: Comment</a></p>
178181
</li>
179182
</ul>
180183
</li>
@@ -454,6 +457,17 @@ <h3 id="name-title-with-id">
454457
Test: a <span><a href="#titleidid" class="xref">reference to the comment</a> (<a href="#titleidid" class="xref">Comment titleidid</a>)</span>.<a href="#section-2.3-1" class="pilcrow"></a></p>
455458
</section>
456459
</div>
460+
<div id="titlecref">
461+
<section id="section-2.4">
462+
<h3 id="name-test-comment">
463+
<a href="#section-2.4" class="section-number selfRef">2.4. </a><a href="#name-test-comment" class="section-name selfRef">Test: Comment</a>
464+
</h3>
465+
<p id="section-2.4-1">
466+
<span class="cref" id="titlecrefid">cref</span>
467+
Text after comment<a href="#section-2.4-1" class="pilcrow"></a></p>
468+
<p id="section-2.4-2">More text after comment<a href="#section-2.4-2" class="pilcrow"></a></p>
469+
</section>
470+
</div>
457471
</section>
458472
<section id="section-3">
459473
<h2 id="name-renaming-references">

tests/valid/draft-v3-features.v3.py37.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
This document tests features introduced in xml2rfc v3 vocabulary.
1313
1414
" name="description">
15-
<meta content="xml2rfc 3.9.1" name="generator">
15+
<meta content="xml2rfc 3.12.3" name="generator">
1616
<meta content="draft-v3-features" name="ietf.draft">
1717
<link href="tests/input/draft-v3-features.xml" rel="alternate" type="application/rfc+xml">
1818
<link href="#copyright" rel="license">
@@ -175,6 +175,9 @@ <h2 id="name-copyright-notice">
175175
</li>
176176
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.3">
177177
<p id="section-toc.1-1.2.2.3.1"><a href="#section-2.3" class="xref">2.3</a>.  <a href="#name-title-with-id" class="xref">Title with id</a></p>
178+
</li>
179+
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.4">
180+
<p id="section-toc.1-1.2.2.4.1"><a href="#section-2.4" class="xref">2.4</a>.  <a href="#name-test-comment" class="xref">Test: Comment</a></p>
178181
</li>
179182
</ul>
180183
</li>
@@ -454,6 +457,17 @@ <h3 id="name-title-with-id">
454457
Test: a <span><a href="#titleidid" class="xref">reference to the comment</a> (<a href="#titleidid" class="xref">Comment titleidid</a>)</span>.<a href="#section-2.3-1" class="pilcrow"></a></p>
455458
</section>
456459
</div>
460+
<div id="titlecref">
461+
<section id="section-2.4">
462+
<h3 id="name-test-comment">
463+
<a href="#section-2.4" class="section-number selfRef">2.4. </a><a href="#name-test-comment" class="section-name selfRef">Test: Comment</a>
464+
</h3>
465+
<p id="section-2.4-1">
466+
<span class="cref" id="titlecrefid">cref</span>
467+
Text after comment<a href="#section-2.4-1" class="pilcrow"></a></p>
468+
<p id="section-2.4-2">More text after comment<a href="#section-2.4-2" class="pilcrow"></a></p>
469+
</section>
470+
</div>
457471
</section>
458472
<section id="section-3">
459473
<h2 id="name-renaming-references">

tests/valid/draft-v3-features.v3.py38.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
This document tests features introduced in xml2rfc v3 vocabulary.
1313
1414
" name="description">
15-
<meta content="xml2rfc 3.9.1" name="generator">
15+
<meta content="xml2rfc 3.12.3" name="generator">
1616
<meta content="draft-v3-features" name="ietf.draft">
1717
<link href="tests/input/draft-v3-features.xml" rel="alternate" type="application/rfc+xml">
1818
<link href="#copyright" rel="license">
@@ -175,6 +175,9 @@ <h2 id="name-copyright-notice">
175175
</li>
176176
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.3">
177177
<p id="section-toc.1-1.2.2.3.1"><a href="#section-2.3" class="xref">2.3</a>.  <a href="#name-title-with-id" class="xref">Title with id</a></p>
178+
</li>
179+
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.4">
180+
<p id="section-toc.1-1.2.2.4.1"><a href="#section-2.4" class="xref">2.4</a>.  <a href="#name-test-comment" class="xref">Test: Comment</a></p>
178181
</li>
179182
</ul>
180183
</li>
@@ -454,6 +457,17 @@ <h3 id="name-title-with-id">
454457
Test: a <span><a href="#titleidid" class="xref">reference to the comment</a> (<a href="#titleidid" class="xref">Comment titleidid</a>)</span>.<a href="#section-2.3-1" class="pilcrow"></a></p>
455458
</section>
456459
</div>
460+
<div id="titlecref">
461+
<section id="section-2.4">
462+
<h3 id="name-test-comment">
463+
<a href="#section-2.4" class="section-number selfRef">2.4. </a><a href="#name-test-comment" class="section-name selfRef">Test: Comment</a>
464+
</h3>
465+
<p id="section-2.4-1">
466+
<span class="cref" id="titlecrefid">cref</span>
467+
Text after comment<a href="#section-2.4-1" class="pilcrow"></a></p>
468+
<p id="section-2.4-2">More text after comment<a href="#section-2.4-2" class="pilcrow"></a></p>
469+
</section>
470+
</div>
457471
</section>
458472
<section id="section-3">
459473
<h2 id="name-renaming-references">

tests/valid/indexes.pages.text

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44

55
Network Working Group H. Person, Ed.
6-
Internet-Draft February 28, 2022
6+
Internet-Draft March 11, 2022
77
Intended status: Experimental
8-
Expires: September 1, 2022
8+
Expires: September 12, 2022
99

1010

1111
xml2rfc index tests
@@ -26,7 +26,7 @@ Status of This Memo
2626
time. It is inappropriate to use Internet-Drafts as reference
2727
material or to cite them other than as "work in progress."
2828

29-
This Internet-Draft will expire on September 1, 2022.
29+
This Internet-Draft will expire on September 12, 2022.
3030

3131
Copyright Notice
3232

@@ -53,9 +53,9 @@ Table of Contents
5353

5454

5555

56-
Person Expires September 1, 2022 [Page 1]
56+
Person Expires September 12, 2022 [Page 1]
5757

58-
Internet-Draft xml2rfc index tests February 2022
58+
Internet-Draft xml2rfc index tests March 2022
5959

6060

6161
This is another section!
@@ -109,9 +109,9 @@ Index
109109

110110

111111

112-
Person Expires September 1, 2022 [Page 2]
112+
Person Expires September 12, 2022 [Page 2]
113113

114-
Internet-Draft xml2rfc index tests February 2022
114+
Internet-Draft xml2rfc index tests March 2022
115115

116116

117117
em Section 1, Paragraph 1
@@ -165,4 +165,4 @@ Author's Address
165165

166166

167167

168-
Person Expires September 1, 2022 [Page 3]
168+
Person Expires September 12, 2022 [Page 3]

tests/valid/indexes.prepped.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="exp" docName="indexes-00" indexInclude="true" ipr="trust200902" prepTime="2022-02-28T01:30:14" scripts="Common,Latin" sortRefs="true" submissionType="independent" symRefs="true" tocDepth="3" tocInclude="true">
2+
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="exp" docName="indexes-00" indexInclude="true" ipr="trust200902" prepTime="2022-03-11T00:41:46" scripts="Common,Latin" sortRefs="true" submissionType="independent" symRefs="true" tocDepth="3" tocInclude="true">
33
<!-- xml2rfc v2v3 conversion 3.12.3 -->
44

55

@@ -20,7 +20,7 @@
2020
</postal>
2121
</address>
2222
</author>
23-
<date day="28" month="02" year="2022"/>
23+
<date day="11" month="03" year="2022"/>
2424
<boilerplate>
2525
<section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
2626
<name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
@@ -41,7 +41,7 @@
4141
material or to cite them other than as "work in progress."
4242
</t>
4343
<t indent="0" pn="section-boilerplate.1-4">
44-
This Internet-Draft will expire on 1 September 2022.
44+
This Internet-Draft will expire on 12 September 2022.
4545
</t>
4646
</section>
4747
<section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">

tests/valid/indexes.text

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44

55
Network Working Group H. Person, Ed.
6-
Internet-Draft February 28, 2022
6+
Internet-Draft March 11, 2022
77
Intended status: Experimental
8-
Expires: September 1, 2022
8+
Expires: September 12, 2022
99

1010

1111
xml2rfc index tests
@@ -26,7 +26,7 @@ Status of This Memo
2626
time. It is inappropriate to use Internet-Drafts as reference
2727
material or to cite them other than as "work in progress."
2828

29-
This Internet-Draft will expire on September 1, 2022.
29+
This Internet-Draft will expire on September 12, 2022.
3030

3131
Copyright Notice
3232

tests/valid/indexes.v3.py36.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
<thead><tr>
2020
<td class="left">Internet-Draft</td>
2121
<td class="center">xml2rfc index tests</td>
22-
<td class="right">February 2022</td>
22+
<td class="right">March 2022</td>
2323
</tr></thead>
2424
<tfoot><tr>
2525
<td class="left">Person</td>
26-
<td class="center">Expires September 1, 2022</td>
26+
<td class="center">Expires September 12, 2022</td>
2727
<td class="right">[Page]</td>
2828
</tr></tfoot>
2929
</table>
@@ -36,12 +36,12 @@
3636
<dd class="internet-draft">indexes-00</dd>
3737
<dt class="label-published">Published:</dt>
3838
<dd class="published">
39-
<time datetime="2022-02-28" class="published">February 28, 2022</time>
39+
<time datetime="2022-03-11" class="published">March 11, 2022</time>
4040
</dd>
4141
<dt class="label-intended-status">Intended Status:</dt>
4242
<dd class="intended-status">Experimental</dd>
4343
<dt class="label-expires">Expires:</dt>
44-
<dd class="expires"><time datetime="2022-09-01">September 1, 2022</time></dd>
44+
<dd class="expires"><time datetime="2022-09-12">September 12, 2022</time></dd>
4545
<dt class="label-authors">Author:</dt>
4646
<dd class="authors">
4747
<div class="author">
@@ -71,7 +71,7 @@ <h2 id="name-status-of-this-memo">
7171
time. It is inappropriate to use Internet-Drafts as reference
7272
material or to cite them other than as "work in progress."<a href="#section-boilerplate.1-3" class="pilcrow"></a></p>
7373
<p id="section-boilerplate.1-4">
74-
This Internet-Draft will expire on September 1, 2022.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
74+
This Internet-Draft will expire on September 12, 2022.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
7575
</section>
7676
</div>
7777
<div id="copyright">

tests/valid/indexes.v3.py37.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
<thead><tr>
2020
<td class="left">Internet-Draft</td>
2121
<td class="center">xml2rfc index tests</td>
22-
<td class="right">February 2022</td>
22+
<td class="right">March 2022</td>
2323
</tr></thead>
2424
<tfoot><tr>
2525
<td class="left">Person</td>
26-
<td class="center">Expires September 1, 2022</td>
26+
<td class="center">Expires September 12, 2022</td>
2727
<td class="right">[Page]</td>
2828
</tr></tfoot>
2929
</table>
@@ -36,12 +36,12 @@
3636
<dd class="internet-draft">indexes-00</dd>
3737
<dt class="label-published">Published:</dt>
3838
<dd class="published">
39-
<time datetime="2022-02-28" class="published">February 28, 2022</time>
39+
<time datetime="2022-03-11" class="published">March 11, 2022</time>
4040
</dd>
4141
<dt class="label-intended-status">Intended Status:</dt>
4242
<dd class="intended-status">Experimental</dd>
4343
<dt class="label-expires">Expires:</dt>
44-
<dd class="expires"><time datetime="2022-09-01">September 1, 2022</time></dd>
44+
<dd class="expires"><time datetime="2022-09-12">September 12, 2022</time></dd>
4545
<dt class="label-authors">Author:</dt>
4646
<dd class="authors">
4747
<div class="author">
@@ -71,7 +71,7 @@ <h2 id="name-status-of-this-memo">
7171
time. It is inappropriate to use Internet-Drafts as reference
7272
material or to cite them other than as "work in progress."<a href="#section-boilerplate.1-3" class="pilcrow"></a></p>
7373
<p id="section-boilerplate.1-4">
74-
This Internet-Draft will expire on September 1, 2022.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
74+
This Internet-Draft will expire on September 12, 2022.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
7575
</section>
7676
</div>
7777
<div id="copyright">

0 commit comments

Comments
 (0)