Sync up with Parsoid parserTests.txt
authorArlo Breault <abreault@wikimedia.org>
Tue, 2 Jan 2018 15:39:45 +0000 (10:39 -0500)
committerArlo Breault <abreault@wikimedia.org>
Tue, 2 Jan 2018 15:42:34 +0000 (10:42 -0500)
This now aligns with Parsoid commit 28d7734fa2385a8fa599e3ce1bfbcd8582c05bc4

Change-Id: Iee7f3f0022c9c770c1a02b401699df0915ea7c86

tests/parser/parserTests.txt

index 840c74d..aa03c0e 100644 (file)
@@ -12633,6 +12633,19 @@ parsoid=wt2html
 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}&#39;>foo&lt;/span>bar"}}'></span></p>
 !! end
 
+!! test
+Preprocessor precedence 17: template w/o target shouldn't prevent closing
+!! options
+parsoid=wt2html
+!! wikitext
+{{echo|hi {{}}}}
+!! html/php
+<p>hi {{}}
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
+!! end
+
 ###
 ### Token Stream Patcher tests
 ###
 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>
 <p>b</p></section>
 !! end
+
+!! test
+Pseudo-sections emitted by templates should have id -2 
+!! options
+parsoid={
+  "wrapSections": true
+}
+!! wikitext
+foo
+{{echo|<div>
+== a ==
+== b ==
+</div>
+}}
+!! html/parsoid
+<section data-mw-section-id="-1"><p>foo</p>
+</section><section data-mw-section-id="-2"><div about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;div>\n== a ==\n== b ==\n&lt;/div>\n"}},"i":0}}]}'>
+<section data-mw-section-id="-1"><h2 id="a"> a </h2>
+</section><section data-mw-section-id="-1"><h2 id="b"> b </h2>
+</section></div><span about="#mwt1">
+</span></section>
+!! end