mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
Update tests for <ref> fragment ID changes in r32160
Note that underscores *are* valid to begin an ID with in XHTML, but not in HTML 4, so are recommended against in HTML-compatible XHTML, although browsers seem to allow it.
This commit is contained in:
parent
b19374a5f7
commit
e44423e8e9
|
@ -9,7 +9,7 @@ Simple <ref>, no <references/>
|
|||
!! input
|
||||
Wikipedia rocks!<ref>Proceeds of Rockology, vol. XXI</ref>
|
||||
!! result
|
||||
<p>Wikipedia rocks!<sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>
|
||||
<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
</p>
|
||||
!! end
|
||||
|
||||
|
@ -20,9 +20,9 @@ Wikipedia rocks!<ref>Proceeds of Rockology, vol. XXI</ref>
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p>Wikipedia rocks!<sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>
|
||||
<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="_note-0"><a href="#_ref-0" title="">↑</a> Proceeds of Rockology, vol. XXI</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> Proceeds of Rockology, vol. XXI</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -41,9 +41,9 @@ Templating<ref>{{simple template}}</ref>
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p>Templating<sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>
|
||||
<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="_note-0"><a href="#_ref-0" title="">↑</a> A <i>simple</i> template.</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> A <i>simple</i> template.</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -54,9 +54,9 @@ Templating<ref><nowiki>{{simple template}}</nowiki></ref>
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p>Templating<sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>
|
||||
<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="_note-0"><a href="#_ref-0" title="">↑</a> {{simple template}}</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> {{simple template}}</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -92,9 +92,9 @@ Templating<ref>Text<!--comment--></ref>
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p>Templating<sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>
|
||||
<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="_note-0"><a href="#_ref-0" title="">↑</a> Text</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> Text</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -107,7 +107,7 @@ Templating<ref>Text<!--comment--></ref>
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p><sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>
|
||||
<p><sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
</p>
|
||||
<table class="gallery" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
|
@ -118,7 +118,7 @@ Templating<ref>Text<!--comment--></ref>
|
|||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<ol class="references"><li id="_note-0"><a href="#_ref-0" title="">↑</a> one</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> one</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -127,7 +127,7 @@ Templating<ref>Text<!--comment--></ref>
|
|||
!! input
|
||||
{{REVISIONID}}<ref>elite</ref>
|
||||
!! result
|
||||
<p>1337<sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>
|
||||
<p>1337<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
</p>
|
||||
!! end
|
||||
|
||||
|
@ -149,10 +149,10 @@ Blank ref followed by ref with content
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p><sup id="_ref-blank_0" class="reference"><a href="#_note-blank" title="">[1]</a></sup>
|
||||
</p><p><sup id="_ref-blank_1" class="reference"><a href="#_note-blank" title="">[1]</a></sup>
|
||||
<p><sup id="cite_ref-blank_0" class="reference"><a href="#cite_note-blank" title="">[1]</a></sup>
|
||||
</p><p><sup id="cite_ref-blank_1" class="reference"><a href="#cite_note-blank" title="">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="_note-blank">↑ <sup><a href="#_ref-blank_0" title="">1.0</a></sup> <sup><a href="#_ref-blank_1" title="">1.1</a></sup> content</li></ol>
|
||||
<ol class="references"><li id="cite_note-blank">↑ <sup><a href="#cite_ref-blank_0" title="">1.0</a></sup> <sup><a href="#cite_ref-blank_1" title="">1.1</a></sup> content</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -165,10 +165,10 @@ Regression: non-blank ref "0" followed by ref with content
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p><sup id="_ref-blank_0" class="reference"><a href="#_note-blank" title="">[1]</a></sup>
|
||||
</p><p><sup id="_ref-blank_1" class="reference"><a href="#_note-blank" title="">[1]</a></sup>
|
||||
<p><sup id="cite_ref-blank_0" class="reference"><a href="#cite_note-blank" title="">[1]</a></sup>
|
||||
</p><p><sup id="cite_ref-blank_1" class="reference"><a href="#cite_note-blank" title="">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="_note-blank">↑ <sup><a href="#_ref-blank_0" title="">1.0</a></sup> <sup><a href="#_ref-blank_1" title="">1.1</a></sup> 0</li></ol>
|
||||
<ol class="references"><li id="cite_note-blank">↑ <sup><a href="#cite_ref-blank_0" title="">1.0</a></sup> <sup><a href="#cite_ref-blank_1" title="">1.1</a></sup> 0</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -181,10 +181,10 @@ Regression sanity check: non-blank ref "1" followed by ref with content
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p><sup id="_ref-blank_0" class="reference"><a href="#_note-blank" title="">[1]</a></sup>
|
||||
</p><p><sup id="_ref-blank_1" class="reference"><a href="#_note-blank" title="">[1]</a></sup>
|
||||
<p><sup id="cite_ref-blank_0" class="reference"><a href="#cite_note-blank" title="">[1]</a></sup>
|
||||
</p><p><sup id="cite_ref-blank_1" class="reference"><a href="#cite_note-blank" title="">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="_note-blank">↑ <sup><a href="#_ref-blank_0" title="">1.0</a></sup> <sup><a href="#_ref-blank_1" title="">1.1</a></sup> 1</li></ol>
|
||||
<ol class="references"><li id="cite_note-blank">↑ <sup><a href="#cite_ref-blank_0" title="">1.0</a></sup> <sup><a href="#cite_ref-blank_1" title="">1.1</a></sup> 1</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -197,13 +197,13 @@ Ref names containing a number
|
|||
|
||||
<references />
|
||||
!! result
|
||||
<p><sup id="_ref-test123test_0" class="reference"><a href="#_note-test123test" title="">[1]</a></sup>
|
||||
<sup id="_ref-123test_0" class="reference"><a href="#_note-123test" title="">[2]</a></sup>
|
||||
<sup id="_ref-test123_0" class="reference"><a href="#_note-test123" title="">[3]</a></sup>
|
||||
<p><sup id="cite_ref-test123test_0" class="reference"><a href="#cite_note-test123test" title="">[1]</a></sup>
|
||||
<sup id="cite_ref-123test_0" class="reference"><a href="#cite_note-123test" title="">[2]</a></sup>
|
||||
<sup id="cite_ref-test123_0" class="reference"><a href="#cite_note-test123" title="">[3]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="_note-test123test"><a href="#_ref-test123test_0" title="">↑</a> One</li>
|
||||
<li id="_note-123test"><a href="#_ref-123test_0" title="">↑</a> Two</li>
|
||||
<li id="_note-test123"><a href="#_ref-test123_0" title="">↑</a> Three</li></ol>
|
||||
<ol class="references"><li id="cite_note-test123test"><a href="#cite_ref-test123test_0" title="">↑</a> One</li>
|
||||
<li id="cite_note-123test"><a href="#cite_ref-123test_0" title="">↑</a> Two</li>
|
||||
<li id="cite_note-test123"><a href="#cite_ref-test123_0" title="">↑</a> Three</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -227,17 +227,17 @@ Erroneous refs
|
|||
<references />
|
||||
!! result
|
||||
<p><strong class="error">Cite error: Invalid <code><ref></code> tag; name cannot be a simple integer, use a descriptive title</strong>
|
||||
</p><p><sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>
|
||||
</p><p><sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
</p><p><strong class="error">Cite error: Invalid <code><ref></code> tag; refs with no content must have a name</strong>
|
||||
</p><p><sup id="_ref-bar_0" class="reference"><a href="#_note-bar" title="">[2]</a></sup>
|
||||
</p><p><sup id="_ref-blankwithnoreference_0" class="reference"><a href="#_note-blankwithnoreference" title="">[3]</a></sup>
|
||||
</p><p><sup id="cite_ref-bar_0" class="reference"><a href="#cite_note-bar" title="">[2]</a></sup>
|
||||
</p><p><sup id="cite_ref-blankwithnoreference_0" class="reference"><a href="#cite_note-blankwithnoreference" title="">[3]</a></sup>
|
||||
</p><p><strong class="error">Cite error: Invalid <code><references></code> tag; no input is allowed, use
|
||||
<code><references /></code></strong>
|
||||
</p><p><strong class="error">Cite error: Invalid <code><references></code> tag; no parameters are allowed, use <code><references /></code></strong>
|
||||
</p>
|
||||
<ol class="references"><li id="_note-0"><a href="#_ref-0" title="">↑</a> Also zero, but differently! (Normal ref)</li>
|
||||
<li id="_note-bar"><a href="#_ref-bar_0" title="">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag; no text was provided for refs named <code>bar</code></strong></li>
|
||||
<li id="_note-blankwithnoreference"><a href="#_ref-blankwithnoreference_0" title="">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag; no text was provided for refs named <code>blankwithnoreference</code></strong></li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> Also zero, but differently! (Normal ref)</li>
|
||||
<li id="cite_note-bar"><a href="#cite_ref-bar_0" title="">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag; no text was provided for refs named <code>bar</code></strong></li>
|
||||
<li id="cite_note-blankwithnoreference"><a href="#cite_ref-blankwithnoreference_0" title="">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag; no text was provided for refs named <code>blankwithnoreference</code></strong></li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
|
Loading…
Reference in a new issue