Subramanya Sastry has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/82871


Change subject: Added a couple new tests that weren't added in recent patches
......................................................................

Added a couple new tests that weren't added in recent patches

Change-Id: I335f58dddee279fcf0c5950296a70ba7a74700cb
---
M js/tests/parserTests-blacklist.js
M js/tests/parserTests.txt
2 files changed, 24 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/71/82871/1

diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index 8284f2d..b9f4dca 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -1278,6 +1278,7 @@
 add("html2wt", "Templates: Indent-Pre: 1f: Wrapping should be based on 
expanded content");
 add("html2wt", "Templates: Strip leading and trailing whitespace from 
named-param values");
 add("html2wt", "Templates: Don't strip whitespace from positional-param 
values");
+add("html2wt", "Templates: Handle empty comment-and-ws-only lines correctly");
 add("html2wt", "1a. Indent-Pre and Comments");
 add("html2wt", "1b. Indent-Pre and Comments");
 add("html2wt", "1c. Indent-Pre and Comments");
diff --git a/js/tests/parserTests.txt b/js/tests/parserTests.txt
index 0921c09..6c3b122 100644
--- a/js/tests/parserTests.txt
+++ b/js/tests/parserTests.txt
@@ -1685,7 +1685,6 @@
 
 !! test
 Templates: Don't strip whitespace from positional-param values
-!! options
 !! input
 {{echo|a }}
 
@@ -1727,6 +1726,19 @@
 </p>
 <pre>g
 </pre>
+!! end
+
+!! test
+Templates: Handle empty comment-and-ws-only lines correctly
+!! input
+{{echo|foo
+<!--should be ignored-->
+ <!--should be ignored as well-->
+bar}}
+!! result
+<p>foo
+bar
+</p>
 !! end
 
 #--------------------------------------------------------------------
@@ -17471,14 +17483,20 @@
 {{echo|1 = f=oo}}
 
 {{echo|1 = f=oo|2 = bar}}
+
+<!--Orig params with data-parsoid has heuristics for handling = chars-->
+<!--FIXME: But maybe the heuristic needs fixing to apply to new params as 
well-->
+{{echo|<nowiki>f=oo</nowiki>|bar}}
 !! result
 <p about="#mwt1" typeof="mw:Transclusion"
-data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'
->foo</p>
+data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
 
 <p about="#mwt1" typeof="mw:Transclusion"
-data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"},
 "2":{"wt":"bar"}},"i":0}}]}'
->foo</p>
+data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"},
 "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
+
+<!--Orig params with data-parsoid has heuristics for handling = chars-->
+<!--FIXME: But maybe the heuristic needs fixing to apply to new params as 
well-->
+<p 
data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]},{"k":"2","spc":["","","",""]}]]}'
 about="#mwt1" typeof="mw:Transclusion" 
data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"},"2":{"wt":"bar"}},"i":0}}]}'>foo</p>
 !! end
 
 !! test

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I335f58dddee279fcf0c5950296a70ba7a74700cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>

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

Reply via email to