Cscott has uploaded a new change for review.

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


Change subject: Move definition list parser tests from Parsoid's whitelist into 
upstream.
......................................................................

Move definition list parser tests from Parsoid's whitelist into upstream.

Parsoid parses certain uses of definition lists differently than the PHP
parser.

Change-Id: I185a805e117fc1b9ee3c0cabc657b48cf39af52b
---
M tests/parser/parserTests.txt
1 file changed, 49 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/89/57689/1

diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index fb0105f..eb11453 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -2167,8 +2167,13 @@
 !! end
 
 
+## The Parsoid team believes the following three test exposes a
+## bug in the PHP parser.  (Parsoid team thinks the PHP parser is
+## wrong to close the <dl> after the <dt> containing the <ul>.)
 !! test
-Definition Lists: Mixed Lists: Test 1
+Definition Lists: Mixed Lists: Test 1 (php)
+!! options
+php
 !! input
 :;* foo
 ::* bar
@@ -2183,7 +2188,19 @@
 </dd></dl>
 
 !! end
-
+!! test
+Definition Lists: Mixed Lists: Test 1 (parsoid)
+!! options
+parsoid
+!! input
+:;* foo
+::* bar
+:; baz
+!! result
+<dl><dd><dl><dt><ul><li> foo
+</li></ul></dt><dd><ul><li> bar
+</li></ul></dd><dt> baz</dt></dl></dd></dl>
+!! end
 
 !! test
 Definition Lists: Mixed Lists: Test 2
@@ -2315,9 +2332,15 @@
 
 !! end
 
+# The Parsoid team disagrees with the PHP parser's seemingly-random
+# rules regarding dd/dt on the next two tests.  Parsoid is more
+# consistent, and recognizes the shared nesting and keeps the
+# still-open tags around until the nesting is complete.
 
 !! test
-Definition Lists: Mixed Lists: Test 11
+Definition Lists: Mixed Lists: Test 11 (php)
+!! options
+php
 !! input
 *#*#;*;;foo :bar
 *#*#;boo :baz
@@ -2335,10 +2358,23 @@
 </li></ul>
 
 !! end
+!! test
+Definition Lists: Mixed Lists: Test 11 (parsoid)
+!! options
+parsoid
+!! input
+*#*#;*;;foo :bar
+*#*#;boo :baz
+!! result
+<ul><li><ol><li><ul><li><ol><li><dl><dt><ul><li><dl><dt><dl><dt>foo&nbsp;</dt><dd>bar
+</dd></dl></dt></dl></li></ul></dt><dt>boo&nbsp;</dt><dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
+!! end
 
 
 !! test
-Definition Lists: Weird Ones: Test 1
+Definition Lists: Weird Ones: Test 1 (php)
+!! options
+php
 !! input
 *#;*::;; foo : bar (who uses this?)
 !! result
@@ -2353,6 +2389,15 @@
 </li></ul>
 
 !! end
+!! test
+Definition Lists: Weird Ones: Test 1 (parsoid)
+!! options
+parsoid
+!! input
+*#;*::;; foo : bar (who uses this?)
+!! result
+<ul><li><ol><li><dl><dt><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> 
foo&nbsp;</dt><dd> bar (who uses 
this?)</dd></dl></dt></dl></dd></dl></dd></dl></li></ul></dt></dl></li></ol></li></ul>
+!! end
 
 ###
 ### External links

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I185a805e117fc1b9ee3c0cabc657b48cf39af52b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>

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

Reply via email to