From 63601400e476c6cf43d985f3e7b9864681695ed4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Jan 2013 16:46:04 +0100 Subject: Update to MediaWiki 1.20.2 this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024 --- tests/parser/parserTest.inc | 18 +- tests/parser/parserTests.txt | 1419 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 1302 insertions(+), 135 deletions(-) (limited to 'tests/parser') diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index 30e451b3..86e1e192 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -140,7 +140,7 @@ class ParserTest { $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo, $parserMemc, $wgThumbnailScriptPath, $wgScriptPath, $wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath, $wgExtensionAssetsPath, - $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType; + $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgLockManagers; $wgScript = '/index.php'; $wgScriptPath = '/'; @@ -149,6 +149,11 @@ class ParserTest { $wgStylePath = '/skins'; $wgExtensionAssetsPath = '/extensions'; $wgThumbnailScriptPath = false; + $wgLockManagers = array( array( + 'name' => 'fsLockManager', + 'class' => 'FSLockManager', + 'lockDirectory' => wfTempDir() . '/test-repo/lockdir', + ) ); $wgLocalFileRepo = array( 'class' => 'LocalRepo', 'name' => 'local', @@ -627,6 +632,11 @@ class ParserTest { 'wgScriptPath' => '/', 'wgArticlePath' => '/wiki/$1', 'wgActionPaths' => array(), + 'wgLockManagers' => array( + 'name' => 'fsLockManager', + 'class' => 'FSLockManager', + 'lockDirectory' => $this->uploadDir . '/lockdir', + ), 'wgLocalFileRepo' => array( 'class' => 'LocalRepo', 'name' => 'local', @@ -680,7 +690,6 @@ class ParserTest { 'wgExternalLinkTarget' => false, 'wgAlwaysUseTidy' => false, 'wgHtml5' => true, - 'wgCleanupPresentationalAttributes' => true, 'wgWellFormedXml' => true, 'wgAllowMicrodataAttributes' => true, 'wgAdaptiveMessageCache' => true, @@ -700,6 +709,9 @@ class ParserTest { $this->savedGlobals = array(); + /** @since 1.20 */ + wfRunHooks( 'ParserTestGlobals', array( &$settings ) ); + foreach ( $settings as $var => $val ) { if ( array_key_exists( $var, $GLOBALS ) ) { $this->savedGlobals[$var] = $GLOBALS[$var]; @@ -951,6 +963,8 @@ class ParserTest { */ private function teardownGlobals() { RepoGroup::destroySingleton(); + FileBackendGroup::destroySingleton(); + LockManagerGroup::destroySingleton(); LinkCache::singleton()->clear(); foreach ( $this->savedGlobals as $var => $val ) { diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 11a55163..df057248 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -59,6 +59,12 @@ MediaWiki:bad image list * [[File:Bad.jpg]] except [[Nasty page]] !!endarticle +!! article +Template:inner list +!! text +* item 1 +!! endarticle + ### ### Basic tests ### @@ -78,6 +84,29 @@ This is a simple paragraph.

!! end +!! test +Paragraphs with extra newline spacing +!! input +foo + +bar + + +baz + + + +booz +!! result +

foo +

bar +


+baz +


+

booz +

+!! end + !! test Simple list !! input @@ -128,6 +157,285 @@ Italics and bold !! end +### +### 2-quote opening sequence tests +### +!! test +Italics and bold: 2-quote opening sequence: (2,2) +!! input +''foo'' +!! result +

foo +

+!!end + + +!! test +Italics and bold: 2-quote opening sequence: (2,3) +!! input +''foo''' +!! result +

foo' +

+!!end + + +!! test +Italics and bold: 2-quote opening sequence: (2,4) +!! input +''foo'''' +!! result +

foo'' +

+!!end + + +!! test +Italics and bold: 2-quote opening sequence: (2,5) +!! input +''foo''''' +!! result +

foo +

+!!end + + +### +### 3-quote opening sequence tests +### + +!! test +Italics and bold: 3-quote opening sequence: (3,2) +!! input +'''foo'' +!! result +

'foo +

+!!end + + +!! test +Italics and bold: 3-quote opening sequence: (3,3) +!! input +'''foo''' +!! result +

foo +

+!!end + + +!! test +Italics and bold: 3-quote opening sequence: (3,4) +!! input +'''foo'''' +!! result +

foo' +

+!!end + + +!! test +Italics and bold: 3-quote opening sequence: (3,5) +!! input +'''foo''''' +!! result +

foo +

+!!end + + +### +### 4-quote opening sequence tests +### + +!! test +Italics and bold: 4-quote opening sequence: (4,2) +!! input +''''foo'' +!! result +

''foo +

+!!end + + +!! test +Italics and bold: 4-quote opening sequence: (4,3) +!! input +''''foo''' +!! result +

'foo +

+!!end + + +!! test +Italics and bold: 4-quote opening sequence: (4,4) +!! input +''''foo'''' +!! result +

'foo' +

+!!end + + +!! test +Italics and bold: 4-quote opening sequence: (4,5) +!! input +''''foo''''' +!! result +

'foo +

+!!end + + +### +### 5-quote opening sequence tests +### + +!! test +Italics and bold: 5-quote opening sequence: (5,2) +!! input +'''''foo'' +!! result +

foo +

+!!end + + +!! test +Italics and bold: 5-quote opening sequence: (5,3) +!! input +'''''foo''' +!! result +

foo +

+!!end + + +!! test +Italics and bold: 5-quote opening sequence: (5,4) +!! input +'''''foo'''' +!! result +

foo' +

+!!end + + +!! test +Italics and bold: 5-quote opening sequence: (5,5) +!! input +'''''foo''''' +!! result +

foo +

+!!end + +### +### multiple quote sequences in a line +### +!! test +Italics and bold: multiple quote sequences: (2,4,2) +!! input +''foo''''bar'' +!! result +

foo'bar +

+!!end + + +!! test +Italics and bold: multiple quote sequences: (2,4,3) +!! input +''foo''''bar''' +!! result +

foo'bar +

+!!end + + +!! test +Italics and bold: multiple quote sequences: (2,4,4) +!! input +''foo''''bar'''' +!! result +

foo'bar' +

+!!end + + +!! test +Italics and bold: multiple quote sequences: (3,4,2) +!! input +'''foo''''bar'' +!! result +

foo'bar +

+!!end + + +!! test +Italics and bold: multiple quote sequences: (3,4,3) +!! input +'''foo''''bar''' +!! result +

foo'bar +

+!!end + +### +### other quote tests +### +!! test +Italics and bold: other quote tests: (2,3,5) +!! input +''this is about '''foo's family''''' +!! result +

this is about foo's family +

+!!end + + +!! test +Italics and bold: other quote tests: (2,(3,3),2) +!! input +''this is about '''foo's''' family'' +!! result +

this is about foo's family +

+!!end + + +!! test +Italics and bold: other quote tests: (3,2,3,2) +!! input +'''this is about ''foo'''s family'' +!! result +

this is about foos family +

+!!end + + +!! test +Italics and bold: other quote tests: (3,2,3,3) +!! input +'''this is about ''foo'''s family''' +!! result +

'this is about foos family +

+!!end + + + +!! test +Italics and bold: other quote tests: (3,(2,2),3) +!! input +'''this is about ''foo's'' family''' +!! result +

this is about foo's family +

+!!end + ### ### test cases ### @@ -465,176 +773,558 @@ Bug 6200: Preformatted in
!! result -
-<nowiki>
-
-

</nowiki> -</pre> -

-<pre> -<nowiki> -</pre> +

+<nowiki>
+
+

</nowiki> +</pre> +

+<pre> +<nowiki> +</pre> + +</pre> +

+!! end + + +### +### Definition lists +### +!! test +Simple definition +!! input +; name : Definition +!! result +
name 
Definition +
+ +!! end + +!! test +Definition list for indentation only +!! input +: Indented text +!! result +
Indented text +
+ +!! end + +!! test +Definition list with no space +!! input +;name:Definition +!! result +
name
Definition +
+ +!!end + +!! test +Definition list with URL link +!! input +; http://example.com/ : definition +!! result +
http://example.com/ 
definition +
+ +!! end + +!! test +Definition list with bracketed URL link +!! input +;[http://www.example.com/ Example]:Something about it +!! result +
Example
Something about it +
+ +!! end + +!! test +Definition list with wikilink containing colon +!! input +; [[Help:FAQ]]: The least-read page on Wikipedia +!! result +
Help:FAQ
The least-read page on Wikipedia +
+ +!! end + +# At Brion's and JeLuF's insistence... :) +!! test +Definition list with news link containing colon +!! input +; news:alt.wikipedia.rox: This isn't even a real newsgroup! +!! result +
news:alt.wikipedia.rox
This isn't even a real newsgroup! +
+ +!! end + +!! test +Malformed definition list with colon +!! input +; news:alt.wikipedia.rox -- don't crash or enter an infinite loop +!! result +
news:alt.wikipedia.rox -- don't crash or enter an infinite loop +
+ +!! end + +!! test +Definition lists: colon in external link text +!! input +; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up +!! result +
Wikipedia : The Next Generation
OK, I made that up +
+ +!! end + +!! test +Definition lists: colon in HTML attribute +!! input +;bold +!! result +
bold +
+ +!! end + + +!! test +Definition lists: self-closed tag +!! input +;one
two : two-line fun +!! result +
one
two 
two-line fun +
+ +!! end + +!! test +Bug 11748: Literal closing tags +!! options +disabled +!! input +
+
test 1
+
test test test test test
+
test 2
+
test test test test test
+
+!! result +
+
test 1
+
test test test test test
+
test 2
+
test test test test test
+
+!! end + +!! test +Definition and unordered list using wiki syntax nested in unordered list using html tags. +!! input +
  • +; term : description +* unordered +
  • +
+!! result +
  • +
    term 
    description +
    +
    • unordered +
    +
  • +
+ +!! end + +!! test +Definition list with empty definition and following paragraph +!! input +; term: +Paragraph text +!! result +
term
+
+

Paragraph text +

+!! end + +!! test +Definition Lists: No nesting: Multiple dd's +!! input +;x +:a +:b +!! result +
x +
a +
b +
+ +!! end + +!! test +Definition Lists: Indentation: Regular +!! input +:i1 +::i2 +:::i3 +!! result +
i1 +
i2 +
i3 +
+
+
+ +!! end + +!! test +Definition Lists: Indentation: Missing 1st level +!! input +::i2 +:::i3 +!! result +
i2 +
i3 +
+
+
+ +!! end + +!! test +Definition Lists: Indentation: Multi-level indent +!! input +:::i3 +!! result +
i3 +
+
+
+ +!! end + +## The PHP parser treats : items (dd) without a corresponding ; item (dt) +## as an empty dt item. It also ignores all but the last ";" when followed +## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in +## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple +## ";"s. +## +## Ex: ";;t2 ::d2" is transformed into: +## +##
+##
t2
+##
+##
+##
+##
d2
+##
+##
+##
+## +## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text +## So, the same wikitext above (;;t2 ::d2) is transformed into: +## +##
+##
+##
+##
t2
+##
:d2
+##
+##
+##
+## +## All Parsoid only definition list tests have this difference. +## +## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569 +## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html + +!! test +Definition Lists: Nesting: Multi-level (Parsoid only) +!! options +disabled +!! input +;t1 :d1 +;;t2 ::d2 +;;;t3 :::d3 +!! result +
+
t1
+
d1
+
+
+
t2
+
:d2
+
+
+
t3
+
::d3
+
+
+
+
+
+ + +!! end + + +!! test +Definition Lists: Nesting: Test 2 (Parsoid only) +!! options +disabled +!! input +;t1 +::d2 +!! result +
+
t1
+
+
+
d2
+
+
+
+ +!! end + + +!! test +Definition Lists: Nesting: Test 3 (Parsoid only) +!! options +disabled +!! input +:;t1 +::::d2 +!! result +
+
+
+
t1
+
+
+
+
+
d2
+
+
+
+
+
+
+
-</pre> -

!! end -### -### Definition lists -### !! test -Simple definition +Definition Lists: Nesting: Test 4 !! input -; name : Definition +::;t3 +:::d3 !! result -
name 
Definition +
t3 +
d3 +
+
!! end + !! test -Definition list for indentation only +Definition Lists: Mixed Lists: Test 1 !! input -: Indented text +:;* foo +::* bar +:; baz !! result -
Indented text +
  • foo +
  • bar +
+
+
baz +
!! end + !! test -Definition list with no space +Definition Lists: Mixed Lists: Test 2 !! input -;name:Definition +*: d1 +*: d2 !! result -
name
Definition +
  • d1 +
    d2
    +
+ +!! end -!!end !! test -Definition list with URL link +Definition Lists: Mixed Lists: Test 3 !! input -; http://example.com/ : definition +*::: d1 +*::: d2 !! result -
http://example.com/ 
definition +
  • d1 +
    d2
    +
    +
    +
!! end + !! test -Definition list with bracketed URL link +Definition Lists: Mixed Lists: Test 4 !! input -;[http://www.example.com/ Example]:Something about it +*;d1 :d2 +*;d3 :d4 !! result -
Example
Something about it +
  • d1 
    d2 +
    d3 
    d4
    +
!! end + !! test -Definition list with wikilink containing colon +Definition Lists: Mixed Lists: Test 5 !! input -; [[Help:FAQ]]: The least-read page on Wikipedia +*:d1 +*:: d2 !! result -
Help:FAQ
The least-read page on Wikipedia +
  • d1 +
    d2
    +
    +
!! end -# At Brion's and JeLuF's insistence... :) + !! test -Definition list with news link containing colon +Definition Lists: Mixed Lists: Test 6 !! input -; news:alt.wikipedia.rox: This isn't even a real newsgroup! +#*:d1 +#*::: d3 !! result -
news:alt.wikipedia.rox
This isn't even a real newsgroup! +
    • d1 +
      d3 +
      +
      +
    +
!! end + !! test -Malformed definition list with colon +Definition Lists: Mixed Lists: Test 7 !! input -; news:alt.wikipedia.rox -- don't crash or enter an infinite loop +:* d1 +:* d2 !! result -
news:alt.wikipedia.rox -- don't crash or enter an infinite loop -
+
  • d1 +
  • d2 +
+
!! end + !! test -Definition lists: colon in external link text +Definition Lists: Mixed Lists: Test 8 !! input -; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up +:* d1 +::* d2 !! result -
Wikipedia : The Next Generation
OK, I made that up +
  • d1 +
+
  • d2 +
+
!! end + !! test -Definition lists: colon in HTML attribute +Definition Lists: Mixed Lists: Test 9 !! input -;bold +*;foo :bar !! result -
bold -
+
  • foo 
    bar +
    +
!! end !! test -Definition lists: self-closed tag +Definition Lists: Mixed Lists: Test 10 !! input -;one
two : two-line fun +*#;foo :bar !! result -
one
two 
two-line fun +
    1. foo 
      bar
      +
    +
!! end + !! test -Bug 11748: Literal closing tags -!! options -disabled +Definition Lists: Mixed Lists: Test 11 !! input -
-
test 1
-
test test test test test
-
test 2
-
test test test test test
-
+*#*#;*;;foo :bar +*#*#;boo :baz !! result -
-
test 1
-
test test test test test
-
test 2
-
test test test test test
-
+
        1. foo 
          • bar +
            +
          +
      +
+
boo 
baz +
+ + + + + !! end + !! test -Definition and unordered list using wiki syntax nested in unordered list using html tags. +Definition Lists: Weird Ones: Test 1 !! input -
  • -; term : description -* unordered -
  • -
+*#;*::;; foo : bar (who uses this?) !! result -
  • -
    term 
    description +
      1. foo 
        • bar (who uses this?) +
          +
          +
        -
        • unordered
        -
      2. -
    +
    +
  • +
!! end - ### ### External links ### @@ -914,6 +1604,23 @@ External links: [IDN ignored character reference in hostname; strip it right off

!! end +# FIXME: This test (the IDN characters in the text of a link) is an inconsistency. +# Where an external link could easily circumvent the sanitization of the text of +# a link like this (where an IDN-ignore character is in the URL somewhere), this +# test demands a higher standard. That's a bit strange. +# +# Example: +# +# http://e‌xample.com -> [http://example.com|http://example.com] +# [http://example.com|http://e‌xample.com] -> [http://example.com|http://e‌xample.com] +# +# The first example is sanitized, but the second is not. Any security benefits +# from this production are trivial to circumvent. Either remove this test and +# let the parser(s) do their thing unaccosted, or fix the inconsistency and change +# the test accordingly. +# +# All our love, +# The Parsoid team. !! test External links: IDN ignored character reference in hostname; strip it right off !! input @@ -1252,6 +1959,8 @@ Normal text. '''This year''''s election ''should'' beat '''last year''''s. ''Tom'''s car is bigger than ''Susan'''s. + +Plain ''italic'''s plain !! result

Bold italic text with bold deactivated in between.

Bold italic text with italic deactivated in between. @@ -1262,6 +1971,7 @@ Normal text.

Normal text.

This year's election should beat last year's.

Toms car is bigger than Susans. +

Plain italic's plain

!! end @@ -2061,20 +2771,58 @@ Failing to transform badly formed HTML into correct XHTML

!!end -!! test +!! test Horizontal ruler (should it add that extra space?) -!! input +!! input

foo
bar -!! result +!! result

foo
bar !! end +!! test +Horizontal ruler -- 4+ dashes render hr +!! input +---- +!! result +
+ +!! end + +!! test +Horizontal ruler -- eats additional dashes on the same line +!! input +--------- +!! result +
+ +!! end + +!! test +Horizontal ruler -- does not collaps dashes on consecutive lines +!! input +---- +---- +!! result +
+
+ +!! end + +!! test +Horizontal ruler -- <4 dashes render as plain text +!! input +--- +!! result +

--- +

+!! end + ### ### Block-level elements ### @@ -2122,32 +2870,150 @@ Mixed list **#Number on level 3 *#number level 2 *Level 1 +*** Level 3 +#** Level 3, but ordered +!! result +
  • Mixed list +
    1. with numbers +
    +
    • and bullets +
    +
    1. and numbers +
    +
  • bullets again +
    • bullet level 2 +
      • bullet level 3 +
        1. Number on level 4 +
        +
      +
    • bullet level 2 +
      1. Number on level 3 +
      2. Number on level 3 +
      +
    +
    1. number level 2 +
    +
  • Level 1 +
      • Level 3 +
      +
    +
+
      • Level 3, but ordered +
      +
    +
+ +!! end + +!! test +Nested lists 1 +!! input +*foo +**bar +!! result +
  • foo +
    • bar +
    +
+ +!! end + +!! test +Nested lists 2 +!! input +**foo +*bar +!! result +
    • foo +
    +
  • bar +
+ +!! end + +!! test +Nested lists 3 (first element empty) +!! input +* +**bar +!! result +
  • +
    • bar +
    +
+ +!! end + +!! test +Nested lists 4 (first element empty) +!! input +** +*bar +!! result +
    • +
    +
  • bar +
+ +!! end + +!! test +Nested lists 5 (both elements empty) +!! input +** +* +!! result +
    • +
    +
  • +
+ +!! end + +!! test +Nested lists 6 (both elements empty) +!! input +* +** +!! result +
  • +
    • +
    +
+ +!! end + +!! test +Nested lists 7 (skip initial nesting levels) +!! input +*** foo !! result -
  • Mixed list -
    1. with numbers -
    -
    • and bullets +
          • foo
          -
          1. and numbers -
          -
        • bullets again -
          • bullet level 2 -
            • bullet level 3 -
              1. Number on level 4 -
            -
          • bullet level 2 -
            1. Number on level 3 -
            2. Number on level 3 -
          -
          1. number level 2 -
          -
        • Level 1 + +!! end + +!! test +Nested lists 8 (multiple nesting transitions) +!! input +* foo +*** bar +** baz +* boo +!! result +
          • foo +
              • bar +
              +
            • baz +
            +
          • boo
          !! end + !! test List items are not parsed correctly following a
           block (bug 785)
           !! input
          @@ -2162,6 +3028,57 @@ List items are not parsed correctly following a 
           block (bug 785)
           
           !! end
           
          +!! test
          +List items from template
          +!! input
          +
          +{{inner list}}
          +* item 2
          +
          +* item 0
          +{{inner list}}
          +* item 2
          +
          +* item 0
          +* notSOL{{inner list}}
          +* item 2
          +!! result
          +
          • item 1 +
          • item 2 +
          +
          • item 0 +
          • item 1 +
          • item 2 +
          +
          • item 0 +
          • notSOL +
          • item 1 +
          • item 2 +
          + +!! end + +!! test +List interrupted by empty line or heading +!! input +* foo + +** bar +== A heading == +* Another list item +!! result +
          • foo +
          +
            • bar +
            +
          +

          [edit] A heading

          +
          • Another list item +
          + +!!end + + ### ### Magic Words ### @@ -2309,6 +3226,17 @@ title=[[User:Ævar Arnfjörð Bjarmason]]

          !! end +!! test +Magic Word: {{NAMESPACENUMBER}} +!! options +title=[[User:Ævar Arnfjörð Bjarmason]] +!! input +{{NAMESPACENUMBER}} +!! result +

          2 +

          +!! end + !! test Magic Word: {{NUMBEROFFILES}} !! input @@ -3482,15 +4410,15 @@ pst [[Bar:Article(context)|]] [[:Bar:Article(context)|]] [[|Article(context)]] -[[Bar:X (Y) Z|]] -[[:Bar:X (Y) Z|]] +[[Bar:X(Y)Z|]] +[[:Bar:X(Y)Z|]] !! result [[Article(context)|Article]] [[Bar:Article(context)|Article]] [[:Bar:Article(context)|Article]] [[Article(context)]] -[[Bar:X (Y) Z|X (Y) Z]] -[[:Bar:X (Y) Z|X (Y) Z]] +[[Bar:X(Y)Z|X(Y)Z]] +[[:Bar:X(Y)Z|X(Y)Z]] !! end !! test @@ -3533,6 +4461,26 @@ pst [[:Bar:X(Y)Z|X(Y)Z]] !! end +!! test +pre-save transform: context links ("pipe trick") with commas (bug 21660) +!! options +pst +!! input +[[Article (context), context|]] +[[Article (context),context|]] +[[Bar:Article (context), context|]] +[[Bar:Article (context),context|]] +[[:Bar:Article (context), context|]] +[[:Bar:Article (context),context|]] +!! result +[[Article (context), context|Article]] +[[Article (context),context|Article]] +[[Bar:Article (context), context|Article]] +[[Bar:Article (context),context|Article]] +[[:Bar:Article (context), context|Article]] +[[:Bar:Article (context),context|Article]] +!! end + !! test pre-save transform: trim trailing empty lines !! options @@ -3681,6 +4629,36 @@ msg No such special page !! end +!! test +{{#speciale:}} page name, known +!! options +msg +!! input +{{#speciale:Recentchanges}} +!! result +Special:RecentChanges +!! end + +!! test +{{#speciale:}} page name with subpage, known +!! options +msg +!! input +{{#speciale:Recentchanges/param}} +!! result +Special:RecentChanges/param +!! end + +!! test +{{#speciale:}} page name, unknown +!! options +msg +!! input +{{#speciale:foobarnonexistent}} +!! result +No_such_special_page +!! end + ### ### Images ### @@ -3734,7 +4712,7 @@ Image with link parameter, URL target !! input [[Image:foobar.jpg|link=http://example.com/]] !! result -

          Foobar.jpg +

          Foobar.jpg

          !! end @@ -3745,7 +4723,29 @@ Image with link parameter, wgExternalLinkTarget !! config wgExternalLinkTarget='foobar' !! result -

          Foobar.jpg +

          Foobar.jpg +

          +!! end + +!! test +Image with link parameter, wgNoFollowLinks set to false +!! input +[[Image:foobar.jpg|link=http://example.com/]] +!! config +wgNoFollowLinks=false +!! result +

          Foobar.jpg +

          +!! end + +!! test +Image with link parameter, wgNoFollowDomainExceptions +!! input +[[Image:foobar.jpg|link=http://example.com/]] +!! config +wgNoFollowDomainExceptions='example.com' +!! result +

          Foobar.jpg

          !! end @@ -3756,7 +4756,7 @@ Image with link parameter, wgExternalLinkTarget, unnamed parameter !! config wgExternalLinkTarget='foobar' !! result -

          Title +

          Title

          !! end @@ -3783,7 +4783,7 @@ Image with link parameter (URL target) and unnamed parameter !! input [[Image:foobar.jpg|link=http://example.com/|Title]] !! result -

          Title +

          Title

          !! end @@ -3999,6 +4999,15 @@ Bug 3090: External links other than http: in image captions !! end +!! test +Custom class +!! input +[[Image:foobar.jpg|a|class=b]] +!! result +

          a +

          +!! end + !! article File:Barfoo.jpg !! text @@ -4523,6 +5532,30 @@ section 5

          !! end +!! test +Headers with excess '=' characters +(Are similar tests necessary beyond the 1st level?) +!! input +=foo== +==foo= +=''italic'' heading== +==''italic'' heading= +!! result +

          Contents

          + +
          +

          [edit] foo=

          +

          [edit] =foo

          +

          [edit] italic heading=

          +

          [edit] =italic heading

          + +!! end + !! test BUG 1219 URL next to image (broken) !! input @@ -6002,9 +7035,7 @@ Special page transclusion !! input {{Special:Prefixindex/Xyzzyx}} !! result -


          -

          -
          Xyzzyx
          +
          Xyzzyx
          !! end @@ -6015,12 +7046,8 @@ Special page transclusion twice (bug 5021) {{Special:Prefixindex/Xyzzyx}} {{Special:Prefixindex/Xyzzyx}} !! result -


          -

          -
          Xyzzyx
          -


          -

          -
          Xyzzyx
          +
          Xyzzyx
          +
          Xyzzyx
          !! end @@ -8449,6 +9476,17 @@ wgUseDynamicDates=true

          !! end +!! test +formatdate parser function, with default format and on a page of which the content language is always English and different from the wiki content language +!! options +language=nl title=[[MediaWiki:Common.css]] +!! input +{{#formatdate:2009-03-24|dmy}} +!! result +

          24 March 2009 +

          +!! end + # # # @@ -8896,22 +9934,6 @@ Bug 31098 Template which includes system messages which includes the template

          !! end -!! test -Deprecated presentational attributes are converted to css -!! input -{| -| valign=top align=left width=100 height=25% | Asdf -|} -
            -!! result - - -
            Asdf -
            -
              - -!! end - !! test Bug31490 Turkish: ucfirst 'blah' !! options @@ -9200,11 +10222,142 @@ nowiki inside link inside heading (bug 18295) !! end +!! test +new support for bdi element (bug 31817) +!! input +

              ולדימיר לנין (ברוסית: Владимир Ленин, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.

              +!! result +

              ולדימיר לנין (ברוסית: Владимир Ленин, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.

              + +!!end + +!! test +Ignore pipe between table row attributes +!! input +{| +| quux +|- id=foo | style='color: red' +| bar +|} +!! result + + + + +
              quux +
              bar +
              + +!! end + +!!test +Gallery override link with WikiLink (bug 34852) +!! input + +File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink + +!! result + + +!! end + +!!test +Gallery override link with absolute external link (bug 34852) +!! input + +File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org + +!! result + + +!! end + +!!test +Gallery override link with malicious javascript (bug 34852) +!! input + +File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!'); + +!! result + + +!! end + +!!test +Language parser function +!! input +{{#language:ar}} +!! result +

              العربية +

              +!! end + +!!test +Padleft and padright as substr +!! input +{{padleft:|3|abcde}} +{{padright:|3|abcde}} +!! result +

              abc +abc +

              +!! end + +!!test +Bug 34939 - Case insensitive link parsing ([HttP://]) +!! input +[HttP://MediaWiki.Org/] +!! result +

              [1] +

              +!! end + +!!test +Bug 34939 - Case insensitive link parsing ([HttP:// title]) +!! input +[HttP://MediaWiki.Org/ MediaWiki] +!! result +

              MediaWiki +

              +!! end + +!!test +Bug 34939 - Case insensitive link parsing (HttP://) +!! input +HttP://MediaWiki.Org/ +!! result +

              HttP://MediaWiki.Org/ +

              +!! end + TODO: more images more tables -math character entities and much more Try for 100% code coverage -- cgit v1.2.3-54-g00ecf