Merge "Add tests for the follow parameter"

This commit is contained in:
jenkins-bot 2015-10-06 20:18:43 +00:00 committed by Gerrit Code Review
commit a93b2b8658

View file

@ -502,3 +502,35 @@ no text was provided for refs named <code>void</code></strong></li>
</ol>
!! end
!! test
<ref>s with the follow parameter
!! input
Page one.<ref name="beginning">First page footnote text.</ref>
Page two.<ref follow="beginning">Second page footnote text.</ref>
== References ==
<references />
!! result
<p>Page one.<sup id="cite_ref-beginning_1-0" class="reference"><a href="#cite_note-beginning-1">[1]</a></sup>
</p><p>Page two.
</p>
<h2><span class="mw-headline" id="References">References</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: References">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<ol class="references">
<li id="cite_note-beginning-1"><span class="mw-cite-backlink"><a href="#cite_ref-beginning_1-0">↑</a></span> <span class="reference-text">First page footnote text. Second page footnote text.</span>
</li>
</ol>
!! end
!! test
<ref> with both name and follow parameters - invalid
!! input
Page one.<ref name="the-name" follow="the-name">This ref is invalid.</ref>
<references />
!! result
<p>Page one.<strong class="error mw-ext-cite-error">Cite error: Invalid <code>&lt;ref&gt;</code> tag;
invalid names, e.g. too many</strong>
</p>
!! end