From: Subramanya Sastry
Date: Mon, 26 Mar 2018 23:42:20 +0000 (-0700)
Subject: Sync up with Parsoid parserTests.txt
X-Git-Tag: 1.31.0-rc.0~270
X-Git-Url: https://git.cyclocoop.org/admin/%7B%24plugin.url%7Cescape%7D?a=commitdiff_plain;h=c34986142739ae8aceca23a17d541c4b09279e6b;p=lhc%2Fweb%2Fwiklou.git
Sync up with Parsoid parserTests.txt
This now aligns with Parsoid commit ad7c4322d4dd7903065f066d8d96ead875b5126b
Change-Id: Ica20c20ce8f40786f9b2b8ec4c3021f49843354f
---
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index cd3858a0a0..0641e0bf4d 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -1257,6 +1257,7 @@ Ruby markup (W3C-style)
:æ±äº¬
;Double-sided ruby
:æ§éå±±
+
â¥â
@@ -3869,6 +3870,7 @@ Definition and unordered list using wiki syntax nested in unordered list using h
Definition list with empty definition and following paragraph
!! wikitext
;term:
+
Paragraph text
!! html
term
@@ -3957,6 +3959,29 @@ should be left alone
!! end
+!! test
+Definition Lists: Hacky use to indent tables (with content following table)
+!! wikitext
+:{|
+|foo
+|bar
+|} this text should be part of the dl
+!! html/php+tidy
+
+
+
foo
+
+
bar
+
this text should be part of the dl
+!! html/parsoid
+
+
+
foo
+
+
bar
+
this text should be part of the dl
+!! end
+
!! test
Definition Lists: Hacky use to indent tables, with comments (T65979)
!! wikitext
@@ -4050,9 +4075,11 @@ Table / list interaction: indented table with lists in table contents
:{|
|-
|a
+
*b
|-
|c
+
*d
|}
!! html
@@ -5543,6 +5570,7 @@ IPv6 urls, autolink format (T23261)
http://[2404:130:0:1000::187:2]/index.php
Examples from RFC 2373, section 2.2:
+
*http://[1080::8:800:200C:417A]/unicast
*http://[FF01::101]/multicast
*http://[::1]/loopback
@@ -5551,6 +5579,7 @@ Examples from RFC 2373, section 2.2:
*http://[::FFFF:129.144.52.38]/ipv4compat
Examples from RFC 2732, section 2:
+
*http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
*http://[1080:0:0:0:8:800:200C:417A]/index.html
*http://[3ffe:2a00:100:7031::1]
@@ -5558,7 +5587,6 @@ Examples from RFC 2732, section 2:
*http://[::192.9.5.5]/ipng
*http://[::FFFF:129.144.52.38]:80/index.html
*http://[2010:836B:4179::836B:4179]
-
!! html/php
Examples from RFC 2373, section 2.2:
@@ -9229,6 +9258,7 @@ language=is
Redirect syntax under text isn't considered a redirect
!! wikitext
some text
+
#redirect [[Main Page]]
!! html/parsoid
some text
@@ -9502,6 +9532,7 @@ Numbered list
!! end
+# the switch from level 3 to ordered should not introduce a newline between
!! test
Mixed list
!! wikitext
@@ -9864,8 +9895,10 @@ parsoid
!! wikitext
#foo
##bar
+
*foo
**bar
+
:foo
::bar
!! html
@@ -16482,10 +16515,10 @@ parsoid=wt2html
Level 4 Heading
Level 5 Heading
Level 6 Heading
-
=Level 7 Heading=
-
==Level 8 Heading==
-
===Level 9 Heading===
-
====Level 10 Heading====
+
=Level 7 Heading=
+
==Level 8 Heading==
+
===Level 9 Heading===
+
====Level 10 Heading====
!! end
!! test
@@ -24755,6 +24788,7 @@ Empty LI and TR nodes should not be stripped from top-level content
* a
*
* b
+
{|
|-
|-
@@ -29424,6 +29458,64 @@ y
}}
!! end
+!! test
+New list is serialized on newlines
+!! options
+parsoid=html2wt
+!! html/parsoid
+
The quick brown fox jumps over the lazy dog.
+
Yesterday
+
Today
+
Tomorrow
+
The quick onyx goblin jumps over the lazy dwarf.
+!! wikitext
+The quick brown fox jumps over the lazy dog.
+
+* Yesterday
+* Today
+* Tomorrow
+
+The quick onyx goblin jumps over the lazy dwarf.
+!! end
+
+!! test
+New lists in formatting elements serialized w/o newlines
+!! options
+parsoid=html2wt
+!! html/parsoid
+
+
+
+
123
+
+
+
+
+
hi
+!! wikitext
+
+* 123
+
+
+
+* hi
+
+!! end
+
+!! test
+New list in table doesn't need newlines
+!! options
+parsoid=html2wt
+!! html/parsoid
+
test
123
+!! wikitext
+{|
+|
+* test
+* 123
+|}
+!! end
+
# ---------------------------------------------------
# End of tests spec'ing wikitext serialization norms |
# ---------------------------------------------------
@@ -30591,3 +30683,110 @@ foo '' italic '' and ''' bold '''
some text
!! end
+
+!! test
+Remove p tags surrounding a single element in a figcaption
+!! options
+parsoid=html2wt
+!! wikitext
+[[File:Foobar.jpg|right|200x200px|Caption]]
+!! html/parsoid
+
Caption
+!! end
+
+!! test
+Selser preserves lack of newline before list and allows newline after the list
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "ul", "after", "
footer
" ]
+ ]
+}
+!! wikitext
+header
+*foo
+*bar
+!! wikitext/edited
+header
+*foo
+*bar
+
+footer
+!! end
+
+
+!! test
+Selser does not introduce newlines between unedited paragraph preceding the list
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ [ "table tbody tr td p:last-child", "empty" ]
+ ]
+}
+!! wikitext
+{|
+|
+header
+*foo
+*bar
+footer
+|}
+!! wikitext/edited
+{|
+|
+header
+*foo
+*bar
+
+|}
+!! end
+
+!! test
+Selser does not introduce newlines between unedited paragraph following the list
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ [ "table tbody tr td p:first-child", "empty" ]
+ ]
+}
+!! wikitext
+{|
+|
+header
+*foo
+*bar
+footer
+|}
+!! wikitext/edited
+{|
+|
+
+*foo
+*bar
+footer
+|}
+!! end
+
+!! test
+Remove a list item but do not insert newline above list
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ [ "ul li:last-child", "remove" ]
+ ]
+}
+!! wikitext
+header
+*foo
+*bar
+footer
+!! wikitext/edited
+header
+*foo
+footer
+!! end