From 7654867bbc071091e38aa783ee5ecec6ee431bb2 Mon Sep 17 00:00:00 2001 From: Arlo Breault Date: Fri, 13 May 2016 13:35:10 -0700 Subject: [PATCH] Sync up with Parsoid parserTests. This now aligns with Parsoid commit b692ba97df11a20978c155e2316578aac2ac973d Change-Id: I659eb045b106d8c48177f546448ddb80e0fdb2a9 --- tests/parser/parserTests.txt | 158 ++++++++++++++++++++++++----------- 1 file changed, 108 insertions(+), 50 deletions(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index e8baa3fe9e..7051b4f5b0 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -5632,7 +5632,7 @@ Parenthesis in external links, w/ transclusion or comment

(http://example.com)

!! html/parsoid -

(http://example.com/hi)

+

(http://example.com/hi)

(http://example.com)

!! end @@ -5650,7 +5650,7 @@ parsoid={ "modes": ["html2wt"], "suppressErrors": true } text *text [[foo]] -*a [[foo]] +*a [[foo]] !! end !! test @@ -5658,7 +5658,7 @@ mw:ExtLink -vs- mw:WikiLink (T94723) !! options parsoid=html2wt !! html/parsoid -Bar +Bar Bar Bar Bar @@ -7110,6 +7110,25 @@ parsoid=html2wt |} !! end +!! test +Testing serialization after deletion in references +!! options +parsoid={ + "modes": ["wt2wt"], + "changes": [ + ["#x", "remove"] + ] +} +!! wikitext +hi
ho
+ + +!! wikitext/edited +hi + + +!! end + !!test Testing serialization after deletion of table cells !!options @@ -7572,10 +7591,10 @@ Broken image links with HTML captions (bug 39700) abc

!! html/parsoid -

- - -

+

+ + +

!! end !! test @@ -8432,7 +8451,7 @@ Blah blah blah !! wikitext #REDIRECT [[{{echo|Foo}}bar]] !! html/parsoid - + !! end !! test @@ -9912,7 +9931,7 @@ Parsoid: Page property magic word with magic word contents !! wikitext {{DISPLAYTITLE:''{{PAGENAME}}''}} !! html/parsoid - + !! end !! test @@ -9920,7 +9939,7 @@ Parsoid: Template-generated DISPLAYTITLE !! wikitext {{{{echo|DISPLAYTITLE}}:Foo}} !! html/parsoid - + !! end !! test @@ -11211,10 +11230,9 @@ parsoid=wt2html |c |} !!html/parsoid - +
c
- !!end ### @@ -11572,7 +11590,7 @@ Templates: Support for templates generating attributes and content
foo
!! html/parsoid -
foo
+
foo
!! end !! test @@ -12931,7 +12949,7 @@ parsoid=wt2html,wt2wt,html2html
This is a caption
!! html/parsoid -
This is a caption
+
This is a caption
!! end !! test @@ -12942,7 +12960,7 @@ parsoid=wt2html,wt2wt,html2html
This is a caption
!! html/parsoid -
This is a caption
+
This is a caption
!! end !! test @@ -12953,7 +12971,7 @@ parsoid=wt2html,wt2wt,html2html

Foobar.jpg

!! html/parsoid -

+

!! end ## Parsoid does not provide editing support for images where templates produce multiple image attributes. @@ -13323,8 +13341,9 @@ Image with wiki markup in implicit alt

testing bold in alt

!! html/parsoid -

-

testing bold in alt

+

+ +

testing bold in alt

!! end !! test @@ -13335,7 +13354,7 @@ Alt image option should handle most kinds of wikitext without barfing
This is a link and a bold template.
This is the image caption
!! html/parsoid -
This is a link and a bold template.
This is the image caption
+
This is a link and a bold template.
This is the image caption
!! end ################### @@ -13562,7 +13581,7 @@ Frameless image caption with a free URL

http://example.com

!! html/parsoid -

+

!! end !! test @@ -13672,7 +13691,7 @@ BUG 648: Frameless image caption with a link

text with a link in it

!! html/parsoid -

+

!! end !! test @@ -13683,7 +13702,7 @@ BUG 648: Frameless image caption with a link (suffix)

text with a linkfoo in it

!! html/parsoid -

+

!! end !! test @@ -13694,7 +13713,7 @@ BUG 648: Frameless image caption with an interwiki link

text with a MeatBall:Link in it

!! html/parsoid -

+

!! end !! test @@ -13705,7 +13724,7 @@ BUG 648: Frameless image caption with a piped interwiki link

text with a link in it

!! html/parsoid -

+

!! end !! test @@ -13713,7 +13732,7 @@ T107474: Frameless image caption with !! wikitext [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]] !! html/parsoid -

+

!! end !! test @@ -13724,7 +13743,7 @@ Escape HTML special chars in image alt text

& < > "

!! html/parsoid -

+

!! end !! test @@ -13735,7 +13754,7 @@ BUG 499: Alt text should have Ӓ, not &1234;

♀

!! html/parsoid -

+

!! end !! test @@ -14073,7 +14092,7 @@ Parsoid-specific image handling - simple image with a formatted caption !! wikitext [[File:Foobar.jpg|
ab
c
]] !! html/parsoid -

+

!! end !! test @@ -14167,7 +14186,7 @@ T93580: 2. inside inline images !! html/parsoid -

+

  1. ↑ foo
!! end @@ -14179,7 +14198,7 @@ T93580: 3. Templated inside inline images !! html/parsoid -

+

  1. ↑ foo
!! end @@ -14781,7 +14800,7 @@ Parsoid: Defaultsort (template-generated) !! wikitext {{{{echo|DEFAULTSORT}}:Foo}} !! html/parsoid - + !! end ### @@ -16010,7 +16029,7 @@ Bug 2304: HTML attribute safety (dangerous template; 2309)
!! html/parsoid -
+
!! end !! test @@ -16549,9 +16568,12 @@ array (
text
 !! end
 
-#  should be output literally since there is no matching tag that begins it
+##  should be output literally since there is no matching tag that begins it
+## Don't expect parsoid to rt this form.
 !! test
 Parser hook: basic arguments using terminated empty elements (bug 2374)
+!! options
+parsoid=wt2html
 !! wikitext
 
 other stuff
@@ -16569,6 +16591,28 @@ array (
 

other stuff </tag>

+!! html/parsoid +

other stuff +</tag>

+!! end + +## Don't expect parsoid to rt this form. +!! test +Parser hook: Don't allow unclosed extension tags +!! options +parsoid=wt2html +!! wikitext +test 123 + +this is a '''test''' +!! html/php +

test <tag>123 +

this is a test +

+!! html/parsoid +

test <tag>123

+ +

this is a test

!! end ### @@ -16891,7 +16935,7 @@ HTML nested bullet list, closed tags (bug 5497) -!! html +!! html/php
  • One
  • Two: @@ -16902,6 +16946,16 @@ HTML nested bullet list, closed tags (bug 5497)
+!! html/parsoid +
    +
  • One
  • +
  • Two: +
      +
    • Sub-one
    • +
    • Sub-two
    • +
    +
  • +
!! end !! test @@ -17271,7 +17325,7 @@ Fuzz testing: image with bogus manual thumbnail
Error creating thumbnail:
!! html/parsoid -
+
!!end !! test @@ -20856,9 +20910,9 @@ percent-encoding and + signs in internal links (Bug 26410) 3E 3E+

!! html/parsoid -

User:+% Page+title% -%+ %20 %+ %+r -% + +

User:+% Page+title% +%+ %20 %+ %+r +% + 3E 3E+

!! end @@ -22109,7 +22163,7 @@ This should just get lost. B [2]

-
  1. ↑ foo
  2. ↑ bar
  3. +
    1. ↑ foo
    2. ↑ bar
    !! end @@ -22142,7 +22196,7 @@ B ↑ foo bar for a
-
    +
    1. ↑ foo
    !! end @@ -22205,8 +22259,11 @@ Entities in ref name
!! end -# This test is wt2html only because we're permitting the serializer to produce -# dirty diffs, normalizing the unclosed references to the self-closed version. +## The output here may look funny, but it's what the php parser will do. The +## unclosed references tag becomes escaped text, and then a new references +## tag is auto-generated. The test is wt2html only because it roundtrips with +## nowiki tags, and the auto-generated references tag is only dropped in +## rtTestMode. !! test Generate references for unclosed references tag !! options @@ -22216,9 +22273,10 @@ afoo !! html/parsoid -

a[1]

-
    -
  1. ↑ foo
+

a[1]

+ +

<references>

+
  1. ↑ foo
!! end !! test @@ -23748,11 +23806,11 @@ a !! test 2. Leading whitespace in non-indent-pre contexts should not be escaped !! options -parsoid=htm2wt +parsoid=html2wt !! html/parsoid

foo [1]

    -
  1. ↑ a +
  2. ↑ a b
!! wikitext @@ -24664,7 +24722,7 @@ T115289: Don't migrate newlines out of tables with fostered content !! wikitext {{echo|[[Category:One]]}}[[Category:Two]] !! html/parsoid -
+
!! end !! test @@ -26690,8 +26748,8 @@ parsoid=html2wt !! html/parsoid

x y

-

-

+

+

!! wikitext x y -- 2.20.1