jenkins-bot has submitted this change and it was merged.

Change subject: Add tests for the follow parameter
......................................................................


Add tests for the follow parameter

Change-Id: Ia939ee6d8bcac0381c4717c6c156d07b8f760f62
---
M citeParserTests.txt
1 file changed, 32 insertions(+), 0 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/citeParserTests.txt b/citeParserTests.txt
index 6c6f7ef..d4dc163 100644
--- a/citeParserTests.txt
+++ b/citeParserTests.txt
@@ -502,3 +502,35 @@
 </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

-- 
To view, visit https://gerrit.wikimedia.org/r/228660
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia939ee6d8bcac0381c4717c6c156d07b8f760f62
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to