From: C. Scott Ananian
Date: Tue, 24 Jun 2014 18:25:05 +0000 (-0400)
Subject: Sync up with Parsoid parserTests.
X-Git-Tag: 1.31.0-rc.0~15262^2
X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=9b8c1fe24a120d679449dd80819c982968b8d446;p=lhc%2Fweb%2Fwiklou.git
Sync up with Parsoid parserTests.
This now aligns with Parsoid commit 5c1681a53606e80522afc6e2496aaef2b30aad4c
Change-Id: Ic871d300eec6ba268eceef6b1014884c763b0e1c
---
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index b3e9c511fd..03e4959d0f 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -1093,6 +1093,59 @@ Non-html5 tags should be accepted
!! end
+## a,rtc not permitted
+## i,b,br omitted
+!! test
+Text-level semantic html elements in wikitext
+!! wikitext
+text
+text
+text
+text
+text
+text
+text
+text
+text
+
+text
+text
+text
+text
+text
+text
+text
+ææ¥
+text
+text
+text
+
+!! html
+
+!! end
+
!! test
Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
!! wikitext
@@ -1223,6 +1276,16 @@ parsoid
!! end
+!! test
+Properly escape nowiki when combined with other wiki markup
+!! options
+parsoid=html2wt
+!! wikitext
+* </nowiki> tag
+!! html
+
* </nowiki> tag
+!! end
+
###
### Comments
###
@@ -4458,6 +4521,16 @@ Parenthesis in external links, w/ transclusion or comment
!! end
+!! test
+Replace invalid link targets when serializing
+!! options
+parsoid=html2wt
+!! html
+Manual
+!! wikitext
+[[MediaWiki:Badtitletext|Manual]]
+!! end
+
###
### Quotes
###
@@ -5185,6 +5258,23 @@ Table cell with a single comment
!! end
+!! test
+Table-cell after a comment-only-empty-line
+!! wikitext
+{|
+|a
+
+| b
+|}
+!! html/parsoid
+
+
a
+
+
b
+
+
+!! end
+
# The expected HTML structure in this test is debatable. The PHP parser does
# not parse this kind of table at all. The main focus for Parsoid is on
# round-tripping, so this output is ok for now. TODO: revisit!
@@ -5349,6 +5439,54 @@ foo
!!end
+!! test
+Strip unsupported table tags
+!! options
+parsoid=html2wt
+!! html
+
+
+
+
Month
+
Savings
+
+
+
+
+
January
+
$100
+
+
+
February
+
$80
+
+
+
+
+
Sum
+
$180
+
+
+
+!! wikitext
+{|
+
+!Month
+!Savings
+
+|January
+|$100
+
+|-
+|February
+|$80
+
+|Sum
+|$180
+
+|}
+!! end
+
###
### Internal links
###
@@ -19399,6 +19537,47 @@ a
b
!! end
+!! test
+2. Leading whitespace in non-indent-pre contexts should not be escaped
+!! options
+parsoid
+!! wikitext
+foo ''a''
+ b
+!! html
+
+!! end
+
+!! test
+3. Leading whitespace in indent-pre suppressing contexts should not be escaped
+!! options
+parsoid
+!! wikitext
+
+ a
+ b
+ c
+
+!! html
+
+
+ a
+ b
+ c
+
+!! end
+
+!! test
+4. Leading whitespace in indent-pre suppressing contexts should not be escaped
+!! options
+parsoid
+!! wikitext
+ [[File:Foobar.jpg|thumb|caption]]
+!! html
+!! html/parsoid
+ caption
+!! end
+
#### --------------- Behavior Switches --------------------
!! test
1. Valid behavior switches should be escaped
@@ -19406,8 +19585,10 @@ a
parsoid=html2wt
!! wikitext
__TOC__
+''__TOC__''
!! html
__TOC__
+__TOC__
!! end
!! test
@@ -19799,6 +19980,20 @@ Indented block & table
!!end
+!! test
+Indent and comment before table row
+!! wikitext
+{|
+ |-
+ | there
+|}
+!! html/parsoid
+
+
+
there
+
+!! end
+
!!test
Empty TR followed by a template-generated TR
(Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
@@ -20470,21 +20665,21 @@ foo
!! end
!! test
-Strip leading whitespace when handling indent-pre inducing tags
+Nowiki-wrap leading whitespace when handling indent-pre inducing tags
!! options
parsoid=html2wt
!! wikitext
foo
-bar
+barfoo2
-bar2
+bar2