2006-06-01 05:58:52 +00:00
|
|
|
|
# Force the test runner to ensure the extension is loaded
|
|
|
|
|
!! hooks
|
|
|
|
|
ref
|
|
|
|
|
references
|
|
|
|
|
!! endhooks
|
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
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>
|
|
|
|
|
!! end
|
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
Simple <ref>, with <references/>
|
|
|
|
|
!! input
|
|
|
|
|
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>
|
|
|
|
|
<ol class="references"><li id="_note-0"><a href="#_ref-0" title="">↑</a> Proceeds of Rockology, vol. XXI</li></ol>
|
|
|
|
|
|
|
|
|
|
!! end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!! article
|
|
|
|
|
Template:Simple template
|
|
|
|
|
!! text
|
|
|
|
|
A ''simple'' template.
|
|
|
|
|
!! endarticle
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
<ref> with a simple template
|
|
|
|
|
!! input
|
|
|
|
|
Templating<ref>{{simple template}}</ref>
|
|
|
|
|
|
|
|
|
|
<references/>
|
|
|
|
|
!! result
|
|
|
|
|
<p>Templating<sup id="_ref-0" class="reference"><a href="#_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>
|
|
|
|
|
|
|
|
|
|
!! end
|
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
<ref> with a <nowiki>
|
|
|
|
|
!! input
|
|
|
|
|
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>
|
|
|
|
|
<ol class="references"><li id="_note-0"><a href="#_ref-0" title="">↑</a> {{simple template}}</li></ol>
|
|
|
|
|
|
|
|
|
|
!! end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
<ref> in a <nowiki>
|
|
|
|
|
!! input
|
|
|
|
|
Templating<nowiki><ref>{{simple template}}</ref></nowiki>
|
|
|
|
|
|
|
|
|
|
<references/>
|
|
|
|
|
!! result
|
|
|
|
|
<p>Templating<ref>{{simple template}}</ref>
|
|
|
|
|
</p>
|
2006-07-10 17:56:51 +00:00
|
|
|
|
<ol class="references"></ol>
|
|
|
|
|
|
2006-06-01 05:58:52 +00:00
|
|
|
|
!! end
|
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
<ref> in a <!--comment-->
|
|
|
|
|
!! input
|
|
|
|
|
Templating<!--<ref>{{simple template}}</ref>-->
|
|
|
|
|
|
|
|
|
|
<references/>
|
|
|
|
|
!! result
|
|
|
|
|
<p>Templating
|
|
|
|
|
</p>
|
2006-07-10 17:56:51 +00:00
|
|
|
|
<ol class="references"></ol>
|
|
|
|
|
|
2006-06-01 05:58:52 +00:00
|
|
|
|
!! end
|
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
<!--comment--> in a <ref> (bug 5384)
|
|
|
|
|
!! input
|
|
|
|
|
Templating<ref>Text<!--comment--></ref>
|
|
|
|
|
|
|
|
|
|
<references/>
|
|
|
|
|
!! result
|
|
|
|
|
<p>Templating<sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>
|
|
|
|
|
</p>
|
|
|
|
|
<ol class="references"><li id="_note-0"><a href="#_ref-0" title="">↑</a> Text</li></ol>
|
|
|
|
|
|
|
|
|
|
!! end
|
2006-06-01 21:11:29 +00:00
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
<references> after <gallery> (bug 6164)
|
|
|
|
|
!! input
|
|
|
|
|
<ref>one</ref>
|
|
|
|
|
|
|
|
|
|
<gallery>Image:Foobar.jpg</gallery>
|
|
|
|
|
|
|
|
|
|
<references/>
|
|
|
|
|
!! result
|
|
|
|
|
<p><sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>
|
|
|
|
|
</p>
|
2007-02-04 03:12:57 +00:00
|
|
|
|
<table class="gallery" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td><div class="gallerybox" style="width: 150px;">
|
|
|
|
|
<div class="thumb" style="padding: 66px 0; width: 150;"><a href="/wiki/Image:Foobar.jpg" title="Image:Foobar.jpg"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" alt="" /></a></div>
|
|
|
|
|
<div class="gallerytext">
|
|
|
|
|
</div>
|
|
|
|
|
</div></td>
|
|
|
|
|
</tr>
|
2006-06-01 21:11:29 +00:00
|
|
|
|
</table>
|
|
|
|
|
<ol class="references"><li id="_note-0"><a href="#_ref-0" title="">↑</a> one</li></ol>
|
|
|
|
|
|
|
|
|
|
!! end
|
2006-07-10 17:59:37 +00:00
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
{{REVISIONID}} on page with <ref> (bug 6299)
|
|
|
|
|
!! input
|
|
|
|
|
{{REVISIONID}}<ref>elite</ref>
|
|
|
|
|
!! result
|
|
|
|
|
<p>1337<sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>
|
|
|
|
|
</p>
|
|
|
|
|
!! end
|
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
{{REVISIONID}} on page without <ref> (bug 6299 sanity check)
|
|
|
|
|
!! input
|
|
|
|
|
{{REVISIONID}}
|
|
|
|
|
!! result
|
|
|
|
|
<p>1337
|
|
|
|
|
</p>
|
|
|
|
|
!! end
|
2006-11-03 15:34:46 +00:00
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
Blank ref followed by ref with content
|
|
|
|
|
!! input
|
|
|
|
|
<ref name="blank"/>
|
|
|
|
|
|
|
|
|
|
<ref name="blank">content</ref>
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
<ol class="references"><li id="_note-blank">↑ <a href="#_ref-blank_0" title=""><sup>1.0</sup></a> <a href="#_ref-blank_1" title=""><sup>1.1</sup></a> content</li></ol>
|
|
|
|
|
|
|
|
|
|
!! end
|
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
Regression: non-blank ref "0" followed by ref with content
|
|
|
|
|
!! input
|
|
|
|
|
<ref name="blank">0</ref>
|
|
|
|
|
|
|
|
|
|
<ref name="blank">content</ref>
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
<ol class="references"><li id="_note-blank">↑ <a href="#_ref-blank_0" title=""><sup>1.0</sup></a> <a href="#_ref-blank_1" title=""><sup>1.1</sup></a> 0</li></ol>
|
|
|
|
|
|
|
|
|
|
!! end
|
|
|
|
|
|
|
|
|
|
!! test
|
|
|
|
|
Regression sanity check: non-blank ref "1" followed by ref with content
|
|
|
|
|
!! input
|
|
|
|
|
<ref name="blank">1</ref>
|
|
|
|
|
|
|
|
|
|
<ref name="blank">content</ref>
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
<ol class="references"><li id="_note-blank">↑ <a href="#_ref-blank_0" title=""><sup>1.0</sup></a> <a href="#_ref-blank_1" title=""><sup>1.1</sup></a> 1</li></ol>
|
|
|
|
|
|
|
|
|
|
!! end
|