From d4bc99e7eda74bd6e820195a6fe886dc0f391719 Mon Sep 17 00:00:00 2001
From: "C. Scott Ananian"
Date: Mon, 9 Jun 2014 16:14:08 -0400
Subject: [PATCH] Sync up with Parsoid parserTests.
This now aligns with Parsoid commit d6666187bac33cbdb0ad5f67d20be98680845b24
Change-Id: Ib4fd31e9d1c14e6a171d39510b5621baf1642b9e
---
tests/parser/parserTests.txt | 136 ++++++++++++++++++++++++++++-------
1 file changed, 109 insertions(+), 27 deletions(-)
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index a39409374a..7276349a43 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -2208,6 +2208,16 @@ data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
"params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b
!! end
+!! test
+Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
+!! options
+parsoid
+!! wikitext
+{{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
+!! html
+[Main Page bar]
+!! end
+
!! test
Templates: Don't escape already nowiki-escaped text in template parameters
!! options
@@ -2356,6 +2366,57 @@ c
!!end
+!!test
+2d. Indent-Pre and tables
+!! wikitext
+ a
+ {|
+ | b
+ |}
+!! html/php
+a
+
+
+
+!! html/parsoid
+a
+
+
+!!end
+
+!!test
+2e. Indent-Pre and table-line syntax
+!! wikitext
+ a
+ | b
+ | c
+!! html/parsoid
+a
+| b
+| c
+!!end
+
+!!test
+2f. Indent-pre started by table-line syntax
+!! wikitext
+a
+ | b
+ | c
+!! html/parsoid
+a
+
+| b
+| c
+!!end
+
!!test
3a. Indent-Pre and block tags (single-line html)
!! wikitext
@@ -4143,32 +4204,6 @@ Bug 4781, 5267: %28, %29 in bracketed URL
link
!! end
-# Note that parsoid does not munge anchor text; all non-space
-# characters are valid in HTML5 ids.
-!! test
-Anchor containing a #. (bug 63430)
-!! wikitext
-[[Main Page#And#Link]]
-!! html/php
-Main Page#And#Link
-
-!! html/parsoid
-Main Page#And#Link
-!! end
-
-# Note that parsoid does not munge anchor text; all non-space
-# characters are valid in HTML5 ids.
-!! test
-Anchor containing a #. (bug 63430)
-!! wikitext
-[[Main Page#And#Link]]
-!! html/php
-Main Page#And#Link
-
-!! html/parsoid
-Main Page#And#Link
-!! end
-
!! test
External link containing a period in the anchor. (bug 63947)
!! wikitext
@@ -4772,6 +4807,18 @@ Accept "||" in table headings
!! end
+!! test
+Accept "!!" in table data
+!! wikitext
+{|
+| Foo!! ||
+|}
+!! html/parsoid
+
+!! end
+
!! test
Accept "||" in indented table headings
!! wikitext
@@ -5484,6 +5531,19 @@ Link with multiple pipes
!! end
+# Note that parsoid does not munge anchor text; all non-space
+# characters are valid in HTML5 ids.
+!! test
+Anchor containing a #. (bug 63430)
+!! wikitext
+[[Main Page#And#Link]]
+!! html/php
+Main Page#And#Link
+
+!! html/parsoid
+Main Page#And#Link
+!! end
+
!! test
Link to namespaces
!! wikitext
@@ -6058,6 +6118,14 @@ parsoid
a b c
!! end
+!! test
+Link with angle bracket after anchor
+!! wikitext
+[[Foo#]]
+!! html/parsoid
+Foo#<bar>
+!! end
+
###
### Interwiki links (see maintenance/interwiki.sql)
###
@@ -8629,7 +8697,7 @@ parsoid=wt2html,wt2wt
|c
|}
!!html/parsoid
-{{{b}}}
+{{{b}}}
!!end
@@ -19682,6 +19750,20 @@ Indented table with an empty td
!!end
+!!test
+Indented block & table
+!! wikitext
+ foo
+ {|
+ |foo
+ |}
+!! html/parsoid
+ foo
+
+!!end
+
!!test
Empty TR followed by a template-generated TR
(Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
--
2.20.1