Add tests for the follow parameter

Change-Id: Ia939ee6d8bcac0381c4717c6c156d07b8f760f62
This commit is contained in:
Amir E. Aharoni 2015-08-02 17:53:56 +03:00 committed by Amire80
parent 7f70cd127f
commit c27317873f

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