From 4d22c8506f66049ee4c7eacad86a65b29b4556ad Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Thu, 4 Apr 2013 17:47:41 -0400 Subject: [PATCH] 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 --- tests/parser/parserTests.txt | 53 +++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index baf9a6175b..0d7b4e21a4 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -2167,8 +2167,13 @@ Definition Lists: Nesting: Test 4 !! 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
after the
containing the
    .) !! test -Definition Lists: Mixed Lists: Test 1 +Definition Lists: Mixed Lists: Test 1 (php) +!! options +php !! input :;* foo ::* bar @@ -2183,7 +2188,19 @@ Definition Lists: Mixed Lists: Test 1
!! end - +!! test +Definition Lists: Mixed Lists: Test 1 (parsoid) +!! options +parsoid +!! input +:;* foo +::* bar +:; baz +!! result +
  • foo +
  • bar +
baz
+!! end !! test Definition Lists: Mixed Lists: Test 2 @@ -2315,9 +2332,15 @@ Definition Lists: Mixed Lists: Test 10 !! 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 @@ Definition Lists: Mixed Lists: Test 11 !! end +!! test +Definition Lists: Mixed Lists: Test 11 (parsoid) +!! options +parsoid +!! input +*#*#;*;;foo :bar +*#*#;boo :baz +!! result + +!! end !! test -Definition Lists: Weird Ones: Test 1 +Definition Lists: Weird Ones: Test 1 (php) +!! options +php !! input *#;*::;; foo : bar (who uses this?) !! result @@ -2352,6 +2388,15 @@ Definition Lists: Weird Ones: Test 1 +!! end +!! test +Definition Lists: Weird Ones: Test 1 (parsoid) +!! options +parsoid +!! input +*#;*::;; foo : bar (who uses this?) +!! result + !! end ### -- 2.20.1