X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=bbfea6ae7177a22e2a6ecd48a75c2d3a985bfd6c;hb=72c1b0c39c354c5fde462c5ba3315689cf543cfd;hp=ce2c73406a066862f8a34a856cce764a288b891a;hpb=df56dbcbb6e0d433910767f0f7b5a7849b36cfd7;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index ce2c73406a..bbfea6ae71 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1657,7 +1657,7 @@ parsoid !!input

foo

!!result -

foo

+

foo

!!end !!test @@ -2156,7 +2156,7 @@ c !!end !!test -3c. Indent-Pre and block tags (multi-line html) +3b. Indent-Pre and block tags (multi-line html) !!input a foo b
foo
@@ -2168,7 +2168,7 @@ c !!end !!test -3b. Indent-Pre and block tags (pre-content on separate line) +3c. Indent-Pre and block tags (pre-content on separate line) !!input

foo @@ -2231,6 +2231,78 @@ foo !!end +!!test +4. Indent-Pre and extension tags +!!input + a +File:foobar.jpg + +!!result + a

+ +!!end + +!! test +Leading pipes outside of tables +!! options +parsoid +!! input +| foo +!! result +

| foo

+!! end + +!! test +Leading pipes outside of tables 2 +!! options +parsoid +!! input +a +| foo +b +!! result +

a +| foo +b

+!! end + +!! test +Leading pipes outside of tables 3 +!! options +parsoid +!! input +a +| class="foo bar" | baz +b +!! result +

a +| class="foo bar" | baz +b

+!! end + +!!test +Render paragraphs when indent-pre is suppressed in blocklevels +!!input +
+ foo + + bar +
+!! result +
+

foo +

bar +

+
+ +!!end + !!test 4. Multiple spaces at start-of-line !!input @@ -4153,9 +4225,9 @@ parsoid (http://example.com) !! result -

(http://example.com/hi)

+

(http://example.com/hi)

-

(http://example.com)

+

(http://example.com)

!! end ### @@ -5174,9 +5246,18 @@ Link with HTML entity in suffix / tail !! test Link with 3 brackets !! input -[[[main page]]] +[[[Main Page]]] +!! result +

[[[Main Page]]] +

+!! end + +!! test +Link with 4 brackets +!! input +[[[[Main Page]]]] !! result -

[[[main page]]] +

[[Main Page]]

!! end @@ -5599,6 +5680,36 @@ language=kaa

!! end +!! test +1. Interaction of linktrail and template encapsulation +!! options +parsoid +!! input +{{echo|[[Foo]]}}l +!! result +

Fool

+!! end + +!! test +2. Interaction of linktrail and template encapsulation +!! options +parsoid +!! input +{{echo|Some [[Fool]]}}s +!! result +

Some Fools

+!! end + +!! test +3. Interaction of linktrail and template encapsulation +!! options +parsoid +!! input +{{echo|Some [[Fool]]s are '''bold and foolish'''}} +!! result +

Some Fools are bold and foolish

+!! end + !! article Söfnuður !! text @@ -5687,7 +5798,7 @@ parsoid !! input [[Foo|{{echo|a}} b {{echo|c}}]] !! result -

a b c

+

a b c

!! end ### @@ -5746,10 +5857,9 @@ parsoid [[:en:Foo]] !! result -

wikipedia:Foo

+

wikipedia:Foo

- -

en:Foo

+

en:Foo

!! end !! test @@ -5771,6 +5881,15 @@ parsoid is just fragment

!! end +!! test +Interwiki links: trail +!! options +parsoid +!! input +[[wikipedia:Foo|Ba]]r +!! result +

Bar

+!! end ### ### Interlanguage links @@ -5856,10 +5975,9 @@ parsoid [[constructor:foo]] !! result -

constructor

- +

constructor

-

constructor:foo

+

constructor:foo

!! end !! test @@ -5883,11 +6001,21 @@ parsoid

ko:

!! end +!! test +Parsoid: Bug #45209, handle interwiki links pointing to the current wiki as plain wiki links +!! options +parsoid +!! input +[[en:Foo]] +!! result +

Foo

+!! end + ### ### Redirects, Parsoid-only ### !! test -Simple redirect to page +1. Simple redirect to page !! options parsoid !! input @@ -5896,6 +6024,19 @@ parsoid !! end +# Only wt2html and html2html since "Main_Page" will serialize to "Main Page" +!! test +2. Other redirect variants +!! options +parsoid=wt2html,wt2wt +!! input +#REDIRECT [[Main_Page]] +#REDIRECT [[[[Bar]]]] +!! result + + +!! end + !! test Optional colon in #REDIRECT !! options @@ -6017,6 +6158,17 @@ language=is !! end +!! test +New redirect +!! options +parsoid=html2wt +!! input +Foo +#REDIRECT [[Foo]] +!! result +

Foo

+!! end + ## ## XHTML tidiness ### @@ -7513,6 +7665,39 @@ hi+world%3F%21

!! end +!! test +Magic Word: prioritize type info over data-parsoid +!! options +parsoid=html2wt +!! input +__FORCETOC__ +!! result + +!! end + +!! test +Magic Word: serialize on separate line (parsoid) +!! options +parsoid=wt2wt,html2wt +!! input +foo +__NOTOC__ +bar +!! result +foobar +!! end + +!! test +Magic Word: rt non-english wikis +!! options +parsoid=wt2wt +language=de +!! input +__NOEDITSECTION__ +!! result + +!! end + ### ### Magic links ### @@ -7583,6 +7768,27 @@ Template with invalid target containing unclosed tag

!! end +!! test +Template with invalid target containing wikilink (php) +!! options +php +!! input +{{[[Main Page]]}} +!! result +

{{Main Page}} +

+!! end + +!! test +Template with invalid target containing wikilink (parsoid) +!! options +parsoid +!! input +{{[[Main Page]]}} +!! result +

{{Main Page}}

+!! end + !! article Template:test !! text @@ -8874,8 +9080,8 @@ parsoid foo -bar - +|bar +|} !!end !!test @@ -9767,6 +9973,31 @@ parsoid
Caption page=stuff
!! end +!! test +Allow empty links in image captions (Bug 60753) (parsoid) +!! options +parsoid +!!input +[[File:Foobar.jpg|thumb|Caption [[Link1]] +[[]] +[[Link2]] +]] +!! result +
Caption Link1 +[[]] +Link2 +
+!! end + +!! test +Link with empty target +!! input +[[]] +!! result +

[[]] +

+!! end + !! test Image with empty attribute (php) !! options @@ -9789,7 +10020,37 @@ parsoid=wt2html !! end !! test -Image with attributes from template (php) +1. Block image with individual attributes from templates +!! options +parsoid +!! input +[[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]] +!! result +
This is a caption
+!! end + +!! test +2. Block Image with individual attributes from templates +!! options +parsoid +!! input +[[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]] +!! result +
This is a caption
+!! end + +!! test +3. Inline image with individual attributes from templates +!! options +parsoid +!! input +[[File:Foobar.jpg|{{echo|50px}}]] +!! result +

+!! end + +!! test +Image with multiple attributes from the same template (php) !! options php !! input @@ -9799,14 +10060,16 @@ php !! end +## Parsoid does not provide editing support for images where templates produce multiple image attributes. +## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future. !! test -Image with attributes from template (parsoid) +Image with multiple attributes from the same template (parsoid) !! options parsoid !! input [[File:Foobar.jpg|{{image_attribs}}]] !! result -
Caption text
+
Caption text
!! end !! test @@ -9836,7 +10099,7 @@ parsoid !! result

123456

123
456 -123
456 +123
456 !! end !! test @@ -9860,6 +10123,54 @@ parsoid
Caption3 - accepted
!! end +!! test +Image with multiple widths -- use last (php) +!! options +php +!! input +[[File:Foobar.jpg|200px|300px|caption]] +!! result +

caption +

+!! end + +!! test +Image with multiple widths -- use last (parsoid) +!! options +parsoid +!! input +[[File:Foobar.jpg|200px|300px|caption]] +!! result +

+!! end + +!! test +Image with multiple alignments -- use first (bug 48664) (php) +!! options +php +!! input +[[File:Foobar.jpg|thumb|left|right|center|caption]] + +[[File:Foobar.jpg|middle|text-top|caption]] +!! result +
caption
+

caption +

+!! end + +!! test +Image with multiple alignments -- use first (bug 48664) (parsoid) +!! options +parsoid +!! input +[[File:Foobar.jpg|thumb|left|right|center|caption]] + +[[File:Foobar.jpg|middle|text-top|caption]] +!! result +
caption
+

+!! end + !! test Image with width attribute at different positions (php) !! options @@ -9880,15 +10191,40 @@ Image with width attribute at different positions (parsoid) !! options parsoid !! input -[[File:Foobar.jpg|200px|right|Caption]] -[[File:Foobar.jpg|right|200px|Caption]] -[[File:Foobar.jpg|right|Caption|200px]] +[[File:Foobar.jpg|200x200px|right|Caption]] +[[File:Foobar.jpg|right|200x200px|Caption]] +[[File:Foobar.jpg|right|Caption|200x200px]] !! result
Caption
Caption
Caption
!! end +# a sad bit of backward-compatibility +!! test +Image with size specified with pxpx (bug 13500, 51628) (php) +!! options +php +!! input +[[File:Foobar.jpg|20pxpx]] +[[File:Foobar.jpg|200x20pxpx]] +!! result +

Foobar.jpg +Foobar.jpg +

+!! end + +!! test +Image with size specified with pxpx (bug 13500, 51628) (parsoid) +!! options +parsoid=wt2html,wt2wt +!! input +[[File:Foobar.jpg|20pxpx]] +[[File:Foobar.jpg|200x20pxpx]] +!! result +

+!! end + !! test Image with link parameter, wiki target (php) !! options @@ -10360,6 +10696,45 @@ Parsoid: Image caption containing leading space !!end +!! test +Image caption containing a table (php) +!! options +php +!! input +[[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table +{| +! Foo !! Bar +|- +| Foo1 || Bar1 +|} +and some more text.]] +!! result +
This is an example image thumbnail caption with a table
Foo Bar
Foo1 Bar1
and some more text.
+ +!!end + +!! test +Image caption containing a table (parsoid) +!! options +parsoid +!! input +[[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table +{| +! Foo !! Bar +|- +| Foo1 || Bar1 +|} +and some more text.]] +!! result +
This is an example image thumbnail caption with a table + + + + + +
Foo Bar
Foo1 Bar1
and some more text.
+!! end + !! test Bug 3090: External links other than http: in image captions !! input @@ -10447,10 +10822,9 @@ Parsoid-specific image handling - simple image with size and middle alignment !! options parsoid !! input -[[Image:Foobar.jpg|50px|middle]] +[[File:Foobar.jpg|middle|50px]] !! result -

- +

@@ -10459,30 +10833,41 @@ parsoid !! end !! test -Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption +Parsoid-specific image handling - simple image with size, middle alignment, +non-standard namespace alias !! options -parsoid +parsoid=wt2wt,wt2html,html2html !! input -[[Image:Foobar.jpg|500x10px|baseline|caption]] +[[Image:Foobar.jpg|middle|50px]] !! result -

- +

- +

!! end !! test -Parsoid-specific image handling - simple image with border and size spec +Parsoid-specific image handling - simple image with size and middle alignment +(existing content) !! options parsoid !! input -[[Image:Foobar.jpg|50px|border|caption]] +[[File:Foobar.jpg|50px|middle]] !! result -

- +

+!! end + +!! test +Parsoid-specific image handling - simple image with size and middle alignment +and non-standard namespace name +!! options +parsoid=wt2html,wt2wt,html2html +!! input +[[Image:Foobar.jpg|50px|middle]] +!! result +

@@ -10490,27 +10875,58 @@ parsoid

!! end +!! test +Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption +!! options +parsoid +!! input +[[File:Foobar.jpg|500x10px|baseline|caption]] +!! result +

+!! end + +!! test +Parsoid-specific image handling - simple image with border and size spec +!! options +parsoid +!! input +[[File:Foobar.jpg|50px|border|caption]] +!! result +

+!! end + !! test Parsoid-specific image handling - thumbnail with halign, valign, and caption !! options parsoid !! input -[[Image:Foobar.jpg|thumb|left|baseline|caption content]] +[[File:Foobar.jpg|left|baseline|thumb|caption content]] !! result
- +
caption content
!! end +!! test +Parsoid-specific image handling - thumbnail with halign, valign, and caption +(existing content) +!! options +parsoid +!! input +[[File:Foobar.jpg|thumb|left|baseline|caption content]] +!! result +
caption content
+!! end + !! test Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption !! options parsoid !! input -[[Image:Foobar.jpg|thumb|50x50px|right|middle|caption]] +[[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]] !! result
@@ -10520,12 +10936,23 @@ parsoid
!! end +!! test +Parsoid-specific image handling - thumbnail with specific size, halign, +valign, and caption (existing content) +!! options +parsoid +!! input +[[File:Foobar.jpg|thumb|50x50px|right|middle|caption]] +!! result +
caption
+!! end + !! test Parsoid-specific image handling - framed image with specific size and caption !! options parsoid !! input -[[Image:Foobar.jpg|500x50px|frame|caption]] +[[Image:Foobar.jpg|frame|500x50px|caption]] !! result
@@ -10535,12 +10962,23 @@ parsoid
!! end +!! test +Parsoid-specific image handling - framed image with specific size and caption +(existing content) +!! options +parsoid +!! input +[[File:Foobar.jpg|442x50px|frame|caption]] +!! result +
caption
+!! end + !! test Parsoid-specific image handling - framed image with specific size, halign, valign, and caption !! options parsoid !! input -[[Image:Foobar.jpg|500x50px|frame|left|baseline|caption]] +[[Image:Foobar.jpg|left|baseline|frame|500x50px|caption]] !! result
@@ -10550,43 +10988,46 @@ parsoid
!! end +!! test +Parsoid-specific image handling - framed image with specific size, halign, +valign, and caption (existing content) +!! options +parsoid +!! input +[[File:Foobar.jpg|442x50px|frame|left|baseline|caption]] +!! result +
caption
+!! end + !! test Parsoid-specific image handling - frameless image with specific size, border, and caption !! options parsoid !! input -[[Image:Foobar.jpg|frameless|500x50px|border|caption]] +[[File:Foobar.jpg|frameless|442x50px|border|caption]] !! result -

- - - - -

+

!! end -#!! test -#Parsoid-specific image handling - simple image with a formatted caption -#!! options -#parsoid -#!! input -#[[Image:Foobar.jpg|
ab
c
]] -#!! result -#

-# -# -#Foobar.jpg -# -#abc -# -#

+!! test +Parsoid-specific image handling - simple image with a formatted caption +!! options +parsoid +!! input +[[File:Foobar.jpg|
ab
c
]] +!! result +

+ + +

+!! end !! test Parsoid-specific image handling - caption with a template in it !! options parsoid !! input -[[File:Foobar.jpg|thumb|200x200px|This caption has a {{echo|transclusion}} in it.]] +[[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]] !! result
This caption has a transclusion in it.
!! end @@ -10605,6 +11046,40 @@ bar

bar

!! end +!! test +Parsoid-specific image handling - empty caption +!! options +parsoid +!! input +[[File:Foobar.jpg|thumb|]] +!! result +
+!! end + +!! test +Parsoid-specific image handling - whitespace caption +!! options +parsoid +!! input +[[File:Foobar.jpg|thumb| ]] +!! result +
+!! end + +!! test +Parsoid-specific image handling - lang option +!! options +parsoid +!! input +foo +[[File:Foobar.svg|lang=de|caption]] +bar +!! result +

foo + +bar

+!! end + ### ### Subpages @@ -12117,7 +12592,7 @@ MSIE CSS safety test: comment in expression !! end !! test -CSS safety test: vertical tab +CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567) !! input

A

!! result @@ -12126,7 +12601,7 @@ CSS safety test: vertical tab !! end !! test -MSIE CSS safety test: Fullwidth +MSIE 6 CSS safety test: Fullwidth (bug 55332) !! input

A

B
@@ -12137,7 +12612,7 @@ MSIE CSS safety test: Fullwidth !! end !! test -MSIE CSS safety test: IPA extensions +MSIE 6 CSS safety test: IPA extensions (bug 55332) !! input
A

B

@@ -12148,7 +12623,7 @@ MSIE CSS safety test: IPA extensions !! end !! test -MSIE CSS safety test: sup/sub script +MSIE 6 CSS safety test: sup/sub script (bug 55332) !! input
A
B
@@ -12161,7 +12636,18 @@ MSIE CSS safety test: sup/sub script !! end !! test -MSIE CSS safety test: Repetition markers +Opera -o-link CSS +!! input +
X
+!! result +
X
+ +!! end + +!! test +MSIE 6 CSS safety test: Repetition markers (bug 55332) !! input

A

B

@@ -13152,7 +13638,7 @@ Special page transclusion !! input {{Special:Prefixindex/Xyzzyx}} !! result -
Xyzzyx
+
Xyzzyx
!! end @@ -13163,8 +13649,8 @@ Special page transclusion twice (bug 5021) {{Special:Prefixindex/Xyzzyx}} {{Special:Prefixindex/Xyzzyx}} !! result -
Xyzzyx
-
Xyzzyx
+
Xyzzyx
+
Xyzzyx
!! end @@ -14431,6 +14917,15 @@ ISBN ISBN 1234567890

!! end +!! test +ISBN with an X +!! input +ISBN 3-462-04561-X +!! result +

ISBN 3-462-04561-X +

+!! end + !! test Bug 22905: followed by ISBN followed by !! input @@ -16687,6 +17182,19 @@ language=be-tarask

!! end +!! test +Wrong option for formatNum (bug 56199) +!! input +{{formatnum:1,234.56|Random}} +{{formatnum:1,234.56|EVERYTHING}} +{{formatnum:1234.56|any argument that has the string 'NOSEP'}} +!! result +

1,234.56 +1,234.56 +1,234.56 +

+!! end + !! test Strip marker in grammar !! options @@ -17012,10 +17520,10 @@ A !!result -

A [1]

+

A [1]

    -
  1. ↑ This is a bolded link and this is a transclusion +
  2. ↑ This is a bolded link and this is a transclusion
!!end @@ -17118,11 +17626,11 @@ A foo B C !!result -

A [1] B C

+

A [1] B C

-
    -
  1. ↑ foo
  2. +
      +
    1. ↑ foo
    !!end @@ -17134,8 +17642,8 @@ parsoid A foo B C bar D !!result -

    A [1] B -C [2] D

    +

    A [1] B +C [2] D

    !!end !!test @@ -17182,9 +17690,9 @@ parsoid !!result -

    [1]

    +

    [1]

    -
      +
      1. ↑ foo <ref>bar</ref> baz
      !!end @@ -17243,7 +17751,7 @@ B bar !!result

      A [a 1] -B [b 1]

      +B [b 1]

      1. ↑ foo
      @@ -17267,9 +17775,9 @@ B bar
      1. ↑ foo
      -

      B [1]

      +

      B [1]

      -
      1. ↑ bar
      2. +
        1. ↑ bar
        !!end @@ -17288,14 +17796,14 @@ C cfoo !!result

        A [a 1] -B [1]

        +B [1]

        1. ↑ afoo
        -

        C [2]

        +

        C [2]

        -
        1. ↑ bfoo
        2. ↑ cfoo
        3. +
          1. ↑ bfoo
          2. ↑ cfoo
          !!end @@ -17312,11 +17820,11 @@ B bar This should just get lost. !!result -

          A [1] -B [2]

          +

          A [1] +B [2]

          -
            +
            1. ↑ foo
            2. ↑ bar
            @@ -17346,20 +17854,49 @@ B foo !! result -

            A [1] -B [2]

            +

            A [1] +B [2]

            -
              +
              1. ↑ foo bar for a
              2. ↑
              -
                -
              1. ↑ foo
              2. +
                  +
                1. ↑ foo
                !! 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. +!! test +Generate references for unclosed references tag +!! options +parsoid=wt2html +!! input +afoo + + +!! result +

                a[1]

                + + +
                  +
                1. ↑ foo
                +!! end + +!! test +New reference serializes on its own line +!! options +parsoid=wt2wt,html2wt +!! input +foo + +!! result +foo
                  +!! end + #### ---------------------------------------------------------------- #### The following section of tests are primarily to test #### wikitext escaping capabilities of Parsoid. Given that @@ -18087,6 +18624,21 @@ parsoid !! end +!! test +Tables: Digest broken attributes on table and tr tag +!! options +parsoid=wt2html +!! input +{| || |} ++ +|- || || ++ -- +|} +!! result + + + +
                  +!! end + #### --------------- Links ---------------- #### 1. Quote marks in link text #### 2. Wikilinks: Escapes needed @@ -18109,15 +18661,17 @@ Links 2. WikiLinks: Escapes needed !! options parsoid !! input -[[Foo|[Foobar]]] +[[Foo|[Foobar]]] [[Foo|Foobar]]] [[Foo|x [Foobar] x]] -[[Foo|x [http://google.com g] x]] +[[Foo|x [http://google.com g] x]] [[Foo|[[Bar]]]] [[Foo|x [[Bar]] x]] [[Foo||Bar]] [[Foo|]]bar]] [[Foo|[[bar]] +[[Foo|x [[ y]] +[[Foo|x ]] y]] [[Foo|x ]] y [[ z]] !! result [Foobar] @@ -18129,6 +18683,8 @@ parsoid |Bar ]]bar [[bar +x [[ y +x ]] y x ]] y [[ z !! end @@ -18805,7 +19361,7 @@ plain text !!end !!test -Ensure fostered text content is wrapped in spans +1. Ensure fostered text content is wrapped in spans !!options parsoid=wt2html !!input @@ -18817,6 +19373,24 @@ parsoid=wt2html
                  !!end +!!test +2. Ensure fostered text content is wrapped in spans (traps regressions around fostered marker on the span getting lost) +!!options +parsoid=wt2html,wt2wt +!!input + + || || +
                  a +
                  +!!result + || || + + + + +
                  a
                  +!!end + !!test Encapsulation properly handles null DSR information from foster box !!options @@ -18999,14 +19573,24 @@ parsoid=wt2html,wt2wt |} !!result -
                  +
                  -
                  +
                  - +
                  !!end +!!test +Support element with .data attribute +!!options +parsoid=html2wt +!!input + +!!result + +!!end + # ----------------------------------------------------------------- # The following section of tests are primarily to spec requirements # around serialization of new/edited content. @@ -19015,25 +19599,134 @@ parsoid=wt2html,wt2wt # ---------------------------------------------------------------- !! test -Image: Modifying size of an image +Image: Modifying size of an image (1) +!! options +parsoid=html2wt +!! input +[[Image:Foobar.jpg|200x200px]] +!! result +

                  +!!end + +!! test +Image: Modifying size of an image (2) +!! options +parsoid=html2wt +!! input +[[Image:Foobar.jpg|500x500px]] +!! result +

                  +!!end + +# note that the data-parsoid value conflicts with the figure's class +!! test +Image: Modifying alignment of an image (bug 48665) +!! options +parsoid=html2wt +!! input +[[Image:Foobar.jpg|thumb|caption|left]] +!! result +
                  caption
                  +!! end + +!! test +Image: Modifying valign of an image (bug 49221) !! options parsoid=html2wt !! input -[[Image:Wiki.png|230x230px]] +[[File:Foobar.jpg|20px|text-top]] !! result -

                  +

                  +!! end + +!! test +Image: Modifying alt attribute of an image (bug 56400) +!! options +parsoid=html2wt +!! input +[[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]] +!! result +
                  some alternate edited text
                  some caption
                  !!end !! test -Image: New block level image should have \n before and after +Image: Modifying caption of an image !! options parsoid=html2wt !! input +[[Image:Foobar.jpg|thumb|new caption]] +!! result +
                  new caption
                  +!!end + +!! test +Image: empty alt attribute (bug 48924) +!! options +parsoid +!! input +[[File:Foobar.jpg|thumb|alt=|bar]] +!! result +
                  bar
                  +!! end + +#!! test +#Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852) +#!! options +#parsoid=html2wt +#language=ar +#!! input +#[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]] +#!! result +#
                  +#!! end + +!! test +Image: Block level image should have \n before and after +!! options +parsoid +!! input +123 +[[File:Foobar.jpg|right|thumb|150x150px]] +456 +!! result +

                  123

                  456

                  +!!end + +!! test +Image: New block level image should have \n before and after (existing +content) +!! options +parsoid +!! input 123 -[[File:Wiki.png|right|thumb|150x150px]] +[[File:Foobar.jpg|right|thumb|150x150px]] 456 !! result -

                  123

                  456

                  +

                  123

                  +
                  +

                  456

                  +!!end + +!! test +Images: upright option (parsoid) +!! options +parsoid +!! input +[[File:Foobar.jpg|thumb|upright|caption]] +[[File:Foobar.jpg|thumb|upright=0.5|caption]] +[[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]] +!! result +
                  caption
                  caption
                  caption
                  +!!end + +!! test +Images: upright option is ignored on inline and frame images (parsoid) +!! options +parsoid +!! input +[[File:Foobar.jpg|500x500px|upright=0.5|caption]] +!! result +

                  !!end !! test @@ -19390,6 +20083,16 @@ parsoid=html2wt New PMID !! end +!! test +Edited Redirect link should emit a non-piped wikitext link +!! options +parsoid=html2wt +!! input +#REDIRECT [[Bar]] +!! result + +!! end + # ----------------------------------------------------------------- # End of section for Parsoid-only html2wt tests for serialization # of new content