X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=cef935c77986e5e08d092628a717f58dcd984a69;hb=1c421c155f9a3b9d6b7fbfae6255e87119aafb64;hp=3c861ea10b33494b8bed013a650c70ca904eb6cd;hpb=89b0452fcab09cd18c53c373f668a0180168a2d4;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 3c861ea10b..cef935c779 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1912,6 +1912,33 @@ a
foo

b

!! end +!! test +No p-wrappable content +!! wikitext +
x
+
x
+
x
+!! html+tidy +
x
+
x
+
x
+!! html/parsoid +
x
+
x
+
x
+!! end + +# T177612: Parsoid-only test +!! test +Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code +!! wikitext +{{echo|
x
}} +x +!! html/parsoid +
x
+

x

+!! end + !! test Block tag on one line (
) !! wikitext @@ -4806,8 +4833,11 @@ foo//example.com/Foo

!! end +## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia: !! test External links: with no contents +!! options +parsoid=wt2html,wt2wt !! wikitext [http://en.wikipedia.org/wiki/Foo] @@ -4911,7 +4941,7 @@ External links: Free with trailing quotes (T113666) news:'a'b''c''d e !! html/php

News: Stuff here -

news:'a'bcd e +

news:'a'bcd e

!! html/parsoid

News: Stuff here

@@ -5557,8 +5587,8 @@ External link containing a single quote. (T65947) [//foo.org/bar'baz bang] !! html/php -

[1] -

bang +

[1] +

bang

!! html/parsoid

@@ -5935,11 +5965,11 @@ parsoid=html2wt !! wikitext [[Foo|Bar]] [[Foo|Bar]] -[[wikipedia:Foo|Bar]] -[[wikipedia:Foo|Bar]] +[[:en:Foo|Bar]] +[[:en:Foo|Bar]] -[[wikipedia:European_Robin|European Robin]] -[[wikipedia:European_Robin|European Robin]] +[[:en:European_Robin|European Robin]] +[[:en:European_Robin|European Robin]] !! end !! test @@ -7973,7 +8003,7 @@ Link containing double-single-quotes '' (T6598) !! wikitext [[Lista d''e paise d''o munno]] !! html/php -

Lista d''e paise d''o munno +

Lista d''e paise d''o munno

!! html/parsoid

Lista d''e paise d''o munno

@@ -8038,9 +8068,9 @@ Link with double quotes in title part (literal) and alternate part (interpreted) [[''Pentecoste''|''Pentecoste'']] !! html/php

File:Denys Savchenko Pentecoste.jpg -

''Pentecoste'' -

Pentecoste -

Pentecoste +

''Pentecoste'' +

Pentecoste +

Pentecoste

!! html/parsoid

@@ -8333,7 +8363,7 @@ language=kaa !! wikitext [[Something]]'nice !! html -

Something'nice +

Something'nice

!! end @@ -8517,6 +8547,31 @@ parsoid=html2wt,html2html Aðrir mótmælenda[[söfnuður]] !! end +!! test +Parsoid link bracket escaping +!! options +parsoid=html2wt,html2html +!! html/parsoid +

Test

+

[Test]

+

[[Test]]

+

[[[Test]]]

+

[[[[Test]]]]

+

[[[[[Test]]]]]

+!! wikitext +[[Test]] + +[[[Test]]] + +[[[[Test]]]] + +[[[[[Test]]]]] + +[[[[[[Test]]]]]] + +[[[[[[[Test]]]]]]] +!! end + !! test Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved !! wikitext @@ -8584,8 +8639,11 @@ parsoid=wt2html,wt2wt,html2html

MeatBall:

!! end +## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia: !! test Interwiki link encoding conversion (T3636) +!! options +parsoid=wt2html,wt2wt !! wikitext *[[Wikipedia:ro:Olteniţa]] *[[Wikipedia:ro:Olteniţa]] @@ -8598,6 +8656,11 @@ Interwiki link encoding conversion (T3636)
  • Wikipedia:ro:OlteniÅ£a
  • Wikipedia:ro:OlteniÅ£a
  • +!! html/parsoid + !! end !! test @@ -9411,7 +9474,7 @@ Handling html with a div self-closing tag !! html/parsoid
    -
    +
    @@ -11324,6 +11387,15 @@ Templates with templated name
    • item 1
    !! end +## Regression test; the output here isn't really that interesting. +!! test +Templates with templated name and top level template args +!! wikitext +{{1{{2{{{3}}}|4=5}}}} +!! html/parsoid +

    {{1{{2{{{3}}}|4=5}}}}

    +!! end + # Parsoid markup is deliberate "broken". This is an edge case. # See long comment in TemplateHandler.js:convertAttribsToString. !! test @@ -14762,6 +14834,28 @@ Alt image option should handle most kinds of wikitext without barfing
    This is a link and a bold template.
    This is the image caption
    !! end +!! test +Image with nested tables in caption +!! wikitext +[[File:Foobar.jpg|thumb|Foo
    +{| +| +{| +|z +|} +|} +]] +!! html/parsoid +
    Foo
    + + +
    + + +
    z
    +
    +!! end + ################### # Conflicting image format options. # First option specified should 'win'. @@ -15615,9 +15709,9 @@ T93580: 2. inside inline images !! html/parsoid -

    +

    -
    1. ↑ foo
    +
    1. ↑ foo
    !! end !! test @@ -15627,9 +15721,9 @@ T93580: 3. Templated inside inline images !! html/parsoid -

    +

    -
    1. ↑ foo
    +
    1. ↑ foo
    !! end ### @@ -15817,7 +15911,7 @@ Link to category !! wikitext [[:Category:MediaWiki User's Guide]] !! html -

    Category:MediaWiki User's Guide +

    Category:MediaWiki User's Guide

    !! end @@ -16794,7 +16888,7 @@ section 5

    text & text[edit]

    section 3

    -

    text ' text[edit]

    +

    text ' text[edit]

    section 4

    text " text[edit]

    @@ -18272,18 +18366,16 @@ Nested template calls ### Sanitizer ### -# HTML+Tidy effectively strips out the empty tags completely -# But since Parsoid doesn't it wraps the tags in p-tags -# which Tidy would have done for the PHP parser had there been content inside it. +# HTML+Tidy strips out empty tags completely. Parsoid doesn't. +# FIXME: Wikitext for this first test doesn't match its title. !! test Sanitizer: Closing of open tags !! wikitext
    -!! html -
    +!! html/php+tidy !! html/parsoid -

    +
    !! end !! test @@ -19993,7 +20085,7 @@ parsoid=wt2html ''''' !! html/php !! html/parsoid -

    + !! end # same html as previous, but wikitext adjusted to match parsoid html2wt @@ -22298,7 +22390,7 @@ parsoid={ |} !! end -# Tests LanguageVariantText._fromSelser +# Tests LanguageVariantText._fromSelSer !! test LanguageConverter selser (4) !! options @@ -22672,6 +22764,21 @@ a:b=>c xyz

    !! end +!! test +T179579: Nowiki and lc interaction +!! options +parsoid=wt2html +language=sr +!! wikitext +-{
    123}- + +-{123|456}- +!! html/parsoid +

    + +

    +!! end + !! test T2529: Uncovered bullet !! wikitext @@ -24448,9 +24555,7 @@ parsoid=wt2html,wt2wt !! wikitext '''[[Image:Foobar.jpg|right|300px]]''' !! html/parsoid -

    -
    -

    +
    !! end #### ---------------------------------------------------------------- @@ -29427,7 +29532,7 @@ wgFragmentMode=[ 'html5', 'legacy' ]
  • 3 Тест
  • 4 Тест
  • 5 тест
  • -
  • 6 Hey < # " > % : '
  • +
  • 6 Hey < # " > % : '
  • @@ -29436,8 +29541,8 @@ wgFragmentMode=[ 'html5', 'legacy' ]

    Тест[edit]

    Тест[edit]

    тест[edit]

    -

    Hey < # " > % : '[edit]

    -

    #Foo bar #foo Bar #Тест #тест #Hey < # " > % : ' +

    Hey < # " > % : '[edit]

    +

    #Foo bar #foo Bar #Тест #тест #Hey < # " > % : '

    💩

    #啤酒 #啤酒

    @@ -29483,7 +29588,7 @@ wgFragmentMode=[ 'legacy', 'html5' ]

    Тест[edit]

    Тест[edit]

    тест[edit]

    -

    Hey < # " > % : '[edit]

    +

    Hey < # " > % : '[edit]

    #Foo bar #foo Bar #Тест #тест #Hey < # " > % : '

    .F0.9F.92.A9

    #啤酒 #啤酒 @@ -29521,7 +29626,7 @@ wgFragmentMode=[ 'html5' ]

  • 3 Тест
  • 4 Тест
  • 5 тест
  • -
  • 6 Hey < # " > % : '
  • +
  • 6 Hey < # " > % : '
  • @@ -29530,9 +29635,23 @@ wgFragmentMode=[ 'html5' ]

    Тест[edit]

    Тест[edit]

    тест[edit]

    -

    Hey < # " > % : '[edit]

    -

    #Foo bar #foo Bar #Тест #тест #Hey < # " > % : ' +

    Hey < # " > % : '[edit]

    +

    #Foo bar #foo Bar #Тест #тест #Hey < # " > % : '

    💩

    #啤酒 #啤酒

    !! end + +!! test +T90902: Normalize weird characters in section IDs +!! config +wgFragmentMode=[ 'html5', 'legacy' ] +!! wikitext +== Foo bar == +[[#Foo bar]] + +!! html/php +

    Foo bar[edit]

    +

    #Foo bar +

    +!! end