Subramanya Sastry has uploaded a new change for review.

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

Change subject: New manual edit selser tests for recent bug fixes
......................................................................

New manual edit selser tests for recent bug fixes

Change-Id: Id2b2f57aa0094daaa93f0bf1b15a519446a35e62
---
M tests/parserTests.txt
1 file changed, 48 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/41/197541/1

diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 30a16d8..8f755c5 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -6395,7 +6395,7 @@
 Testing serialization after deletion of table cells
 !!options
 parsoid={
-  "modes": ["wt2wt"],
+  "modes": ["wt2wt", "selser"],
   "changes": [
     ["#x", "remove"]
   ]
@@ -23797,6 +23797,53 @@
 # of new content
 # -----------------------------------------------------------------
 
+# -----------------------------------------------------------------
+# The following section of tests are primarily to spec behavior of
+# the selective serializer. All these tests have manual selser
+# changes. The automated selser changes for all tests handle the
+# wide variation of changes, but these tests here capture specs
+# deterministically.
+# ----------------------------------------------------------------
+
+## T90517
+!! test
+1. Selser: New comments should not be lost
+!! options
+parsoid={
+  "modes": ["selser"],
+  "changes": [
+    [ "#a", "after", "<!--c1-->" ],
+    [ "#b", "before", "<!--c2-->" ]
+  ]
+}
+!! wikitext
+<span id="a">a</span>
+
+<span id="b">b</span>
+!! wikitext/edited
+<span id="a">a</span><!--c1-->
+
+<!--c2--><span id="b">b</span>
+!! end
+
+## T89383
+!! test
+2. Selser: Check for validity of DSR before using it
+!! options
+parsoid={
+  "modes": ["selser"],
+  "changes": [
+    [ "#a", "before", "<meta property='mw:PageProp/displaytitle' 
content='foo'>" ]
+  ]
+}
+!! wikitext
+<span id="a">a</span>
+!! wikitext/edited
+{{DISPLAYTITLE:foo}}
+<span id="a">a</span>
+!! end
+
+
 TODO:
 more images
 more tables

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2b2f57aa0094daaa93f0bf1b15a519446a35e62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/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