From b45f1e1f15c3f3f2749779a1140cda811e1778dd Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Wed, 27 Jun 2012 16:25:15 +0200 Subject: [PATCH] Group definition list tests; add doc link * Moved the new definition list tests close to the existing ones * Added a link to the relevant bug and discussion to the documentation about differences in nested definition list handling between the PHP parser and Parsoid Change-Id: I94fe59db33a242c505d5e82631ccdeef6155fb04 --- tests/parser/parserTests.txt | 3586 +++++++++++++++++----------------- 1 file changed, 1795 insertions(+), 1791 deletions(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index ece2a9c137..651858cbba 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -931,372 +931,743 @@ Paragraph text

!! end -### -### External links -### !! test -External links: non-bracketed +Definition Lists: No nesting: Multiple dd's !! input -Non-bracketed: http://example.com +;x +:a +:b !! result -

Non-bracketed: http://example.com -

+
x +
a +
b +
+ !! end !! test -External links: numbered +Definition Lists: Indentation: Regular !! input -Numbered: [http://example.com] -Numbered: [http://example.net] -Numbered: [http://example.com] +:i1 +::i2 +:::i3 !! result -

Numbered: [1] -Numbered: [2] -Numbered: [3] -

-!!end +
i1 +
i2 +
i3 +
+
+
-!! test -External links: specified text -!! input -Specified text: [http://example.com link] -!! result -

Specified text: link -

-!!end +!! end !! test -External links: trail +Definition Lists: Indentation: Missing 1st level !! input -Linktrails should not work for external links: [http://example.com link]s +::i2 +:::i3 !! result -

Linktrails should not work for external links: links -

+
i2 +
i3 +
+
+
+ !! end !! test -External links: dollar sign in URL +Definition Lists: Indentation: Multi-level indent !! input -http://example.com/1$2345 +:::i3 !! result -

http://example.com/1$2345 -

+
i3 +
+
+
+ !! end -!! test -External links: dollar sign in URL (named) -!! input -[http://example.com/1$2345] -!! result -

[1] -

-!!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 -External links: open square bracket forbidden in URL (bug 4377) +Definition Lists: Nesting: Multi-level (Parsoid only) +!! options +disabled !! input -http://example.com/1[2345 +;t1 :d1 +;;t2 ::d2 +;;;t3 :::d3 !! result -

http://example.com/1[2345 -

+
+
t1
+
d1
+
+
+
t2
+
:d2
+
+
+
t3
+
::d3
+
+
+
+
+
+ + !! end + !! test -External links: open square bracket forbidden in URL (named) (bug 4377) +Definition Lists: Nesting: Test 2 (Parsoid only) +!! options +disabled !! input -[http://example.com/1[2345] +;t1 +::d2 !! result -

[2345 -

-!!end +
+
t1
+
+
+
d2
+
+
+
-!! test -External links: nowiki in URL link text (bug 6230) -!!input -[http://example.com/ ''example site''] -!! result -

''example site'' -

!! end -!! test -External links: newline forbidden in text (bug 6230 regression check) -!! input -[http://example.com/ first -second] -!! result -

[http://example.com/ first -second] -

-!!end !! test -External links: protocol-relative URL in brackets +Definition Lists: Nesting: Test 3 (Parsoid only) +!! options +disabled !! input -[//example.com/ Test] +:;t1 +::::d2 !! result -

Test -

+
+
+
+
t1
+
+
+
+
+
d2
+
+
+
+
+
+
+
+ !! end + !! test -External links: protocol-relative URL in brackets without text +Definition Lists: Nesting: Test 4 !! input -[//example.com] +::;t3 +:::d3 !! result -

[1] -

+
t3 +
d3 +
+
+
+ !! end -!! test -External links: protocol-relative URL in free text is left alone -!! input -//example.com/Foo -!! result -

//example.com/Foo -

-!!end !! test -External links: protocol-relative URL in the middle of a word is left alone (bug 30269) +Definition Lists: Mixed Lists: Test 1 !! input -foo//example.com/Foo +:;* foo +::* bar +:; baz !! result -

foo//example.com/Foo -

+
  • foo +
  • bar +
+
+
baz +
+
+ !! end + !! test -External image +Definition Lists: Mixed Lists: Test 2 !! input -External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png +*: d1 +*: d2 !! result -

External image: Ncwikicol.png -

+ + !! end + !! test -External image from https +Definition Lists: Mixed Lists: Test 3 !! input -External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png +*::: d1 +*::: d2 !! result -

External image from https: Ncwikicol.png -

+ + !! end + !! test -Link to non-http image, no img tag +Definition Lists: Mixed Lists: Test 4 !! input -Link to non-http image, no img tag: ftp://example.com/test.jpg +*;d1 :d2 +*;d3 :d4 !! result -

Link to non-http image, no img tag: ftp://example.com/test.jpg -

+ + !! end + !! test -External links: terminating separator +Definition Lists: Mixed Lists: Test 5 !! input -Terminating separator: http://example.com/thing, +*:d1 +*:: d2 !! result -

Terminating separator: http://example.com/thing, -

+ + !! end + !! test -External links: intervening separator +Definition Lists: Mixed Lists: Test 6 !! input -Intervening separator: http://example.com/1,2,3 +#*:d1 +#*::: d3 !! result -

Intervening separator: http://example.com/1,2,3 -

+
    • d1 +
      d3 +
      +
      +
      +
    +
+ !! end + !! test -External links: old bug with URL in query +Definition Lists: Mixed Lists: Test 7 !! input -Old bug with URL in query: [http://example.com/thing?url=http://example.com link] +:* d1 +:* d2 !! result -

Old bug with URL in query: link -

+
  • d1 +
  • d2 +
+
+ !! end -!! test -External links: old URL-in-URL bug, mixed protocols -!! input -And again with mixed protocols: [ftp://example.com?url=http://example.com link] -!! result -

And again with mixed protocols: link -

-!!end !! test -External links: URL in text +Definition Lists: Mixed Lists: Test 8 !! input -URL in text: [http://example.com http://example.com] +:* d1 +::* d2 !! result -

URL in text: http://example.com -

+
  • d1 +
+
  • d2 +
+
+
+ !! end + !! test -External links: Clickable images +Definition Lists: Mixed Lists: Test 9 !! input -ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png] +*;foo :bar !! result -

ja-style clickable images: Ncwikicol.png -

-!!end + + +!! end + !! test -External links: raw ampersand +Definition Lists: Mixed Lists: Test 10 !! input -Old & use: http://x&y +*#;foo :bar !! result -

Old & use: http://x&y -

+ + !! end + !! test -External links: encoded ampersand +Definition Lists: Mixed Lists: Test 11 !! input -Old & use: http://x&y +*#*#;*;;foo :bar +*#*#;boo :baz !! result -

Old & use: http://x&y -

+ + + + !! end + !! test -External links: encoded equals (bug 6102) +Definition Lists: Weird Ones: Test 1 !! input -http://example.com/?foo=bar +*#;*::;; foo : bar (who uses this?) !! result -

http://example.com/?foo=bar -

+ + + + + !! end +### +### External links +### !! test -External links: [raw ampersand] +External links: non-bracketed !! input -Old & use: [http://x&y] +Non-bracketed: http://example.com !! result -

Old & use: [1] +

Non-bracketed: http://example.com

!! end !! test -External links: [encoded ampersand] +External links: numbered !! input -Old & use: [http://x&y] +Numbered: [http://example.com] +Numbered: [http://example.net] +Numbered: [http://example.com] !! result -

Old & use: [1] +

Numbered: [1] +Numbered: [2] +Numbered: [3]

-!! end +!!end !! test -External links: [encoded equals] (bug 6102) +External links: specified text !! input -[http://example.com/?foo=bar] +Specified text: [http://example.com link] !! result -

[1] +

Specified text: link

-!! end +!!end !! test -External links: [IDN ignored character reference in hostname; strip it right off] +External links: trail !! input -[http://e‌xample.com/] +Linktrails should not work for external links: [http://example.com link]s !! result -

[1] +

Linktrails should not work for external links: links

!! end !! test -External links: IDN ignored character reference in hostname; strip it right off +External links: dollar sign in URL !! input -http://e‌xample.com/ +http://example.com/1$2345 !! result -

http://example.com/ +

http://example.com/1$2345

!! end !! test -External links: www.jpeg.org (bug 554) +External links: dollar sign in URL (named) !! input -http://www.jpeg.org -!!result -

http://www.jpeg.org +[http://example.com/1$2345] +!! result +

[1]

-!! end +!!end !! test -External links: URL within URL (original bug 2) +External links: open square bracket forbidden in URL (bug 4377) !! input -[http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp] +http://example.com/1[2345 !! result -

[1] +

http://example.com/1[2345

!! end !! test -BUG 361: URL inside bracketed URL +External links: open square bracket forbidden in URL (named) (bug 4377) !! input -[http://www.example.com/foo http://www.example.com/bar] +[http://example.com/1[2345] !! result -

http://www.example.com/bar +

[2345

-!! end +!!end !! test -BUG 361: URL within URL, not bracketed -!! input -http://www.example.com/foo?=http://www.example.com/bar +External links: nowiki in URL link text (bug 6230) +!!input +[http://example.com/ ''example site''] !! result -

http://www.example.com/foo?=http://www.example.com/bar +

''example site''

!! end !! test -BUG 289: ">"-token in URL-tail +External links: newline forbidden in text (bug 6230 regression check) !! input -http://www.example.com/ +[http://example.com/ first +second] !! result -

http://www.example.com/<hello> +

[http://example.com/ first +second]

!!end !! test -BUG 289: literal ">"-token in URL-tail +External links: protocol-relative URL in brackets !! input -http://www.example.com/html +[//example.com/ Test] !! result -

http://www.example.com/html +

Test

-!!end +!! end !! test -BUG 289: ">"-token in bracketed URL +External links: protocol-relative URL in brackets without text !! input -[http://www.example.com/ stuff] +[//example.com] !! result -

<hello> stuff +

[1]

-!!end +!! end !! test -BUG 289: literal ">"-token in bracketed URL +External links: protocol-relative URL in free text is left alone !! input -[http://www.example.com/html stuff] +//example.com/Foo !! result -

html stuff +

//example.com/Foo

!!end !! test -BUG 289: literal double quote at end of URL +External links: protocol-relative URL in the middle of a word is left alone (bug 30269) !! input -http://www.example.com/"hello" +foo//example.com/Foo !! result -

http://www.example.com/"hello" +

foo//example.com/Foo +

+!! end + +!! test +External image +!! input +External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png +!! result +

External image: Ncwikicol.png +

+!! end + +!! test +External image from https +!! input +External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png +!! result +

External image from https: Ncwikicol.png +

+!! end + +!! test +Link to non-http image, no img tag +!! input +Link to non-http image, no img tag: ftp://example.com/test.jpg +!! result +

Link to non-http image, no img tag: ftp://example.com/test.jpg +

+!! end + +!! test +External links: terminating separator +!! input +Terminating separator: http://example.com/thing, +!! result +

Terminating separator: http://example.com/thing, +

+!! end + +!! test +External links: intervening separator +!! input +Intervening separator: http://example.com/1,2,3 +!! result +

Intervening separator: http://example.com/1,2,3 +

+!! end + +!! test +External links: old bug with URL in query +!! input +Old bug with URL in query: [http://example.com/thing?url=http://example.com link] +!! result +

Old bug with URL in query: link +

+!! end + +!! test +External links: old URL-in-URL bug, mixed protocols +!! input +And again with mixed protocols: [ftp://example.com?url=http://example.com link] +!! result +

And again with mixed protocols: link +

+!!end + +!! test +External links: URL in text +!! input +URL in text: [http://example.com http://example.com] +!! result +

URL in text: http://example.com +

+!! end + +!! test +External links: Clickable images +!! input +ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png] +!! result +

ja-style clickable images: Ncwikicol.png +

+!!end + +!! test +External links: raw ampersand +!! input +Old & use: http://x&y +!! result +

Old & use: http://x&y +

+!! end + +!! test +External links: encoded ampersand +!! input +Old & use: http://x&y +!! result +

Old & use: http://x&y +

+!! end + +!! test +External links: encoded equals (bug 6102) +!! input +http://example.com/?foo=bar +!! result +

http://example.com/?foo=bar +

+!! end + +!! test +External links: [raw ampersand] +!! input +Old & use: [http://x&y] +!! result +

Old & use: [1] +

+!! end + +!! test +External links: [encoded ampersand] +!! input +Old & use: [http://x&y] +!! result +

Old & use: [1] +

+!! end + +!! test +External links: [encoded equals] (bug 6102) +!! input +[http://example.com/?foo=bar] +!! result +

[1] +

+!! end + +!! test +External links: [IDN ignored character reference in hostname; strip it right off] +!! input +[http://e‌xample.com/] +!! result +

[1] +

+!! end + +!! test +External links: IDN ignored character reference in hostname; strip it right off +!! input +http://e‌xample.com/ +!! result +

http://example.com/ +

+!! end + +!! test +External links: www.jpeg.org (bug 554) +!! input +http://www.jpeg.org +!!result +

http://www.jpeg.org +

+!! end + +!! test +External links: URL within URL (original bug 2) +!! input +[http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp] +!! result +

[1] +

+!! end + +!! test +BUG 361: URL inside bracketed URL +!! input +[http://www.example.com/foo http://www.example.com/bar] +!! result +

http://www.example.com/bar +

+!! end + +!! test +BUG 361: URL within URL, not bracketed +!! input +http://www.example.com/foo?=http://www.example.com/bar +!! result +

http://www.example.com/foo?=http://www.example.com/bar +

+!! end + +!! test +BUG 289: ">"-token in URL-tail +!! input +http://www.example.com/ +!! result +

http://www.example.com/<hello> +

+!!end + +!! test +BUG 289: literal ">"-token in URL-tail +!! input +http://www.example.com/html +!! result +

http://www.example.com/html +

+!!end + +!! test +BUG 289: ">"-token in bracketed URL +!! input +[http://www.example.com/ stuff] +!! result +

<hello> stuff +

+!!end + +!! test +BUG 289: literal ">"-token in bracketed URL +!! input +[http://www.example.com/html stuff] +!! result +

html stuff +

+!!end + +!! test +BUG 289: literal double quote at end of URL +!! input +http://www.example.com/"hello" +!! result +

http://www.example.com/"hello"

!!end @@ -7676,2511 +8047,2144 @@ foobar.jpg
- - -!! end - -!! test -HTML Hex character encoding (spells the word "JavaScript") -!! input -JavaScript -!! result -

JavaScript -

-!! end - -!! test -HTML Hex character encoding bogus encoding (bug 26437 regression check) -!! input -&#xsee;&#XSEE; -!! result -

&#xsee;&#XSEE; -

-!! end - -!! test -HTML Hex character encoding mixed case -!! input -îî -!! result -

îî -

-!! end - -!! test -__FORCETOC__ override -!! input -__NEWSECTIONLINK__ -__FORCETOC__ -!! result -


-

-!! end - -!! test -ISBN code coverage -!! input -ISBN 978-0-1234-56 789 -!! result -

ISBN 978-0-1234-56 789 -

-!! end - -!! test -ISBN followed by 5 spaces -!! input -ISBN -!! result -

ISBN -

-!! end - -!! test -Double ISBN -!! input -ISBN ISBN 1234567890 -!! result -

ISBN ISBN 1234567890 -

-!! end - -!! test -Bug 22905: followed by ISBN followed by -!! input -(fr) ISBN 2753300917 [http://www.example.com example.com] -!! result -

(fr) ISBN 2753300917 example.com -

-!! end - -!! test -Double RFC -!! input -RFC RFC 1234 -!! result -

RFC RFC 1234 -

-!! end - -!! test -Double RFC with a wiki link -!! input -RFC [[RFC 1234]] -!! result -

RFC RFC 1234 -

-!! end - -!! test -RFC code coverage -!! input -RFC 983 987 -!! result -

RFC 983 987 -

-!! end - -!! test -Centre-aligned image -!! input -[[Image:foobar.jpg|centre]] -!! result -
Foobar.jpg
- -!!end - -!! test -None-aligned image -!! input -[[Image:foobar.jpg|none]] -!! result -
Foobar.jpg
- -!!end - -!! test -Width + Height sized image (using px) (height is ignored) -!! input -[[Image:foobar.jpg|640x480px]] -!! result -

Foobar.jpg -

-!!end - -!! test -Width-sized image (using px, no following whitespace) -!! input -[[Image:foobar.jpg|640px]] -!! result -

Foobar.jpg -

-!!end - -!! test -Width-sized image (using px, with following whitespace - test regression from r39467) -!! input -[[Image:foobar.jpg|640px ]] -!! result -

Foobar.jpg -

-!!end - -!! test -Width-sized image (using px, with preceding whitespace - test regression from r39467) -!! input -[[Image:foobar.jpg| 640px]] -!! result -

Foobar.jpg -

-!!end - -!! test -Another italics / bold test -!! input - ''' ''x' -!! result -
' x'
-
-!!end - -# Note the results may be incorrect, as parserTest output included this: -# XML error: Mismatched tag at byte 6120: -# ...
-
-
-
-
-
-
- -!!end - - -# Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "" tag. -!! test -Images with the "|" character in the comment -!! input -[[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]] -!! result -
An external URL
- -!!end - -!! test -[Before] HTML without raw HTML enabled ($wgRawHtml==false) -!! input - -!! result -

<html><script>alert(1);</script></html> -

-!! end - -!! test -HTML with raw HTML ($wgRawHtml==true) -!! options -rawhtml -!! input - -!! result -

-

-!! end - -!! test -Parents of subpages, one level up -!! options -subpage title=[[Subpage test/L1/L2/L3]] -!! input -[[../|L2]] -!! result -

L2 -

-!! end - - -!! test -Parents of subpages, one level up, not named -!! options -subpage title=[[Subpage test/L1/L2/L3]] -!! input -[[../]] -!! result -

Subpage test/L1/L2 -

-!! end - - - -!! test -Parents of subpages, two levels up -!! options -subpage title=[[Subpage test/L1/L2/L3]] -!! input -[[../../|L1]]2 - -[[../../|L1]]l -!! result -

L12 -

L1l -

-!! end - -!! test -Parents of subpages, two levels up, without trailing slash or name. -!! options -subpage title=[[Subpage test/L1/L2/L3]] -!! input -[[../..]] -!! result -

[[../..]] -

-!! end - -!! test -Parents of subpages, two levels up, with lots of extra trailing slashes. -!! options -subpage title=[[Subpage test/L1/L2/L3]] -!! input -[[../../////]] -!! result -

/// -

+ + !! end !! test -Definition list code coverage +HTML Hex character encoding (spells the word "JavaScript") !! input -; title : def -; title : def -;title: def +JavaScript !! result -
title  
def -
title 
def -
title
def -
- +

JavaScript +

!! end !! test -Don't fall for the self-closing div +HTML Hex character encoding bogus encoding (bug 26437 regression check) !! input -
hello world
+&#xsee;&#XSEE; !! result -
hello world
- +

&#xsee;&#XSEE; +

!! end !! test -MSGNW magic word +HTML Hex character encoding mixed case !! input -{{MSGNW:msg}} +îî !! result -

[[:Template:Msg]] +

îî

!! end !! test -RAW magic word -!! input -{{RAW:QUERTY}} +__FORCETOC__ override +!! input +__NEWSECTIONLINK__ +__FORCETOC__ !! result -

Template:QUERTY +


!! end -# This isn't needed for XHTML conformance, but would be handy as a fallback security measure !! test -Always escape literal '>' in output, not just after '<' +ISBN code coverage !! input -><> +ISBN 978-0-1234-56 789 !! result -

><> +

ISBN 978-0-1234-56 789

!! end !! test -Template caching +ISBN followed by 5 spaces !! input -{{Test}} -{{Test}} +ISBN !! result -

This is a test template -This is a test template +

ISBN

!! end - -!! article -MediaWiki:Fake -!! text -==header== -!! endarticle - !! test -Inclusion of !userCanEdit() content +Double ISBN !! input -{{MediaWiki:Fake}} +ISBN ISBN 1234567890 !! result -

[edit] header

- +

ISBN ISBN 1234567890 +

!! end - !! test -Out-of-order TOC heading levels +Bug 22905: followed by ISBN followed by !! input -==2== -======6====== -===3=== -=1= -=====5===== -==2== +(fr) ISBN 2753300917 [http://www.example.com example.com] !! result -

Contents

- -
-

[edit] 2

-
[edit] 6
-

[edit] 3

-

[edit] 1

-
[edit] 5
-

[edit] 2

- +

(fr) ISBN 2753300917 example.com +

!! end - !! test -ISBN with a dummy number +Double RFC !! input -ISBN --- +RFC RFC 1234 !! result -

ISBN --- +

RFC RFC 1234

!! end - !! test -ISBN with space-delimited number +Double RFC with a wiki link !! input -ISBN 92 9017 032 8 +RFC [[RFC 1234]] !! result -

ISBN 92 9017 032 8 +

RFC RFC 1234

!! end - !! test -ISBN with multiple spaces, no number +RFC code coverage !! input -ISBN foo +RFC 983 987 !! result -

ISBN foo +

RFC 983 987

!! end - !! test -ISBN length +Centre-aligned image !! input -ISBN 123456789 - -ISBN 1234567890 - -ISBN 12345678901 +[[Image:foobar.jpg|centre]] !! result -

ISBN 123456789 -

ISBN 1234567890 -

ISBN 12345678901 -

-!! end +
Foobar.jpg
+!!end !! test -ISBN with trailing year (bug 8110) +None-aligned image !! input -ISBN 1-234-56789-0 - 2006 - -ISBN 1 234 56789 0 - 2006 +[[Image:foobar.jpg|none]] !! result -

ISBN 1-234-56789-0 - 2006 -

ISBN 1 234 56789 0 - 2006 -

-!! end +
Foobar.jpg
+!!end !! test -anchorencode +Width + Height sized image (using px) (height is ignored) !! input -{{anchorencode:foo bar©#%n}} +[[Image:foobar.jpg|640x480px]] !! result -

foo_bar.C2.A9.23.25n +

Foobar.jpg

-!! end +!!end !! test -anchorencode trims spaces +Width-sized image (using px, no following whitespace) !! input -{{anchorencode: __pretty__please__}} +[[Image:foobar.jpg|640px]] !! result -

pretty_please +

Foobar.jpg

-!! end +!!end !! test -anchorencode deals with links +Width-sized image (using px, with following whitespace - test regression from r39467) !! input -{{anchorencode: [[hello|world]] [[hi]]}} +[[Image:foobar.jpg|640px ]] !! result -

world_hi +

Foobar.jpg

-!! end +!!end !! test -anchorencode deals with templates +Width-sized image (using px, with preceding whitespace - test regression from r39467) !! input -{{anchorencode: {{Foo}} }} +[[Image:foobar.jpg| 640px]] !! result -

FOO +

Foobar.jpg

-!! end +!!end !! test -anchorencode encodes like the TOC generator: (bug 18431) +Another italics / bold test !! input -=== _ +:.3A%3A&&]] === -{{anchorencode: _ +:.3A%3A&&]] }} -__NOEDITSECTION__ + ''' ''x' !! result -

_ +:.3A%3A&&]]

-

.2B:.3A.253A.26.26.5D.5D -

-!! end +
' x'
+
+!!end -# Expected output in the following test is not necessarily expected (there -# should probably be

tags inside the

in the output) -- it's -# only testing for well-formedness. +# Note the results may be incorrect, as parserTest output included this: +# XML error: Mismatched tag at byte 6120: +# ...
-foo -
+:;;;:: +!! result +
+
+
+
+
+
+
-bar +!!end - baz -!! result -
-foo -
-

bar -

-
baz
-
-!! end +# Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "" tag. !! test -Bug 8293: Use of center tag ruins paragraph formatting +Images with the "|" character in the comment !! input -
-foo -
+[[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]] +!! result +
An external URL
-bar +!!end - baz +!! test +[Before] HTML without raw HTML enabled ($wgRawHtml==false) +!! input + !! result -
-

foo -

-
-

bar +

<html><script>alert(1);</script></html>

-
baz
-
!! end - -### -### Language variants related tests -### !! test -Self-link in language variants +HTML with raw HTML ($wgRawHtml==true) !! options -title=[[Dunav]] language=sr +rawhtml !! input -Both [[Dunav]] and [[Дунав]] are names for this river. + !! result -

Both Dunav and Дунав are names for this river. +

-!!end - +!! end !! test -Link to pages in language variants +Parents of subpages, one level up !! options -language=sr +subpage title=[[Subpage test/L1/L2/L3]] !! input -Main Page can be written as [[Маин Паге]] +[[../|L2]] !! result -

Main Page can be written as Маин Паге +

L2

-!!end +!! end !! test -Multiple links to pages in language variants +Parents of subpages, one level up, not named !! options -language=sr +subpage title=[[Subpage test/L1/L2/L3]] !! input -[[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]]. +[[../]] !! result -

Main Page can be written as Маин Паге same as Маин Паге. +

Subpage test/L1/L2

-!!end +!! end + !! test -Simple template in language variants +Parents of subpages, two levels up !! options -language=sr +subpage title=[[Subpage test/L1/L2/L3]] !! input -{{тест}} +[[../../|L1]]2 + +[[../../|L1]]l !! result -

This is a test template +

L12 +

L1l

!! end - !! test -Template with explicit namespace in language variants +Parents of subpages, two levels up, without trailing slash or name. !! options -language=sr +subpage title=[[Subpage test/L1/L2/L3]] !! input -{{Template:тест}} +[[../..]] !! result -

This is a test template +

[[../..]]

!! end - !! test -Basic test for template parameter in language variants +Parents of subpages, two levels up, with lots of extra trailing slashes. !! options -language=sr +subpage title=[[Subpage test/L1/L2/L3]] !! input -{{парамтест|param=foo}} +[[../../////]] !! result -

This is a test template with parameter foo +

///

!! end - !! test -Simple category in language variants -!! options -language=sr cat +Definition list code coverage !! input -[[Category:МедиаWики Усер'с Гуиде]] +; title : def +; title : def +;title: def !! result -MediaWiki User's Guide +
title  
def +
title 
def +
title
def +
+ !! end +!! test +Don't fall for the self-closing div +!! input +
hello world
+!! result +
hello world
+ +!! end !! test -Stripping -{}- tags (language variants) -!! options -language=sr +MSGNW magic word !! input -Latin proverb: -{Ne nuntium necare}- +{{MSGNW:msg}} !! result -

Latin proverb: Ne nuntium necare +

[[:Template:Msg]]

!! end - !! test -Prevent conversion with -{}- tags (language variants) -!! options -language=sr variant=sr-ec +RAW magic word !! input -Latinski: -{Ne nuntium necare}- +{{RAW:QUERTY}} !! result -

Латински: Ne nuntium necare +

Template:QUERTY

!! end - +# This isn't needed for XHTML conformance, but would be handy as a fallback security measure !! test -Prevent conversion of text with -{}- tags (language variants) -!! options -language=sr variant=sr-ec +Always escape literal '>' in output, not just after '<' !! input -Latinski: -{Ne nuntium necare}- +><> !! result -

Латински: Ne nuntium necare +

><>

!! end - !! test -Prevent conversion of links with -{}- tags (language variants) -!! options -language=sr variant=sr-ec +Template caching !! input --{[[Main Page]]}- +{{Test}} +{{Test}} !! result -

Main Page +

This is a test template +This is a test template

!! end +!! article +MediaWiki:Fake +!! text +==header== +!! endarticle + !! test --{}- tags within headlines (within html for parserConvert()) -!! options -language=sr variant=sr-ec +Inclusion of !userCanEdit() content !! input -== -{Naslov}- == +{{MediaWiki:Fake}} !! result -

[уреди] Naslov

+

[edit] header

!! end !! test -Explicit definition of language variant alternatives -!! options -language=zh variant=zh-tw +Out-of-order TOC heading levels !! input --{zh:China;zh-tw:Taiwan}-, not China +==2== +======6====== +===3=== +=1= +=====5===== +==2== !! result -

Taiwan, not China -

+

Contents

+ +
+

[edit] 2

+
[edit] 6
+

[edit] 3

+

[edit] 1

+
[edit] 5
+

[edit] 2

+ !! end !! test -Explicit session-wise language variant mapping (A flag and - flag) -!! options -language=zh variant=zh-tw +ISBN with a dummy number !! input -Taiwan is not China. -But -{A|zh:China;zh-tw:Taiwan}- is China, -(This-{-|zh:China;zh-tw:Taiwan}- should be stripped!) -and -{China}- is China. +ISBN --- !! result -

Taiwan is not China. -But Taiwan is Taiwan, -(This should be stripped!) -and China is China. +

ISBN ---

!! end + !! test -Explicit session-wise language variant mapping (H flag for hide) -!! options -language=zh variant=zh-tw +ISBN with space-delimited number !! input -(This-{H|zh:China;zh-tw:Taiwan}- should be stripped!) -Taiwan is China. +ISBN 92 9017 032 8 !! result -

(This should be stripped!) -Taiwan is Taiwan. +

ISBN 92 9017 032 8

!! end + !! test -Adding explicit conversion rule for title (T flag) -!! options -language=zh variant=zh-tw showtitle +ISBN with multiple spaces, no number !! input -Should be stripped-{T|zh:China;zh-tw:Taiwan}-! +ISBN foo !! result -Taiwan -

Should be stripped! +

ISBN foo

!! end + !! test -Testing that changing the language variant here in the tests actually works -!! options -language=zh variant=zh showtitle +ISBN length !! input -Should be stripped-{T|zh:China;zh-tw:Taiwan}-! +ISBN 123456789 + +ISBN 1234567890 + +ISBN 12345678901 !! result -China -

Should be stripped! +

ISBN 123456789 +

ISBN 1234567890 +

ISBN 12345678901

!! end + !! test -Bug 24072: more test on conversion rule for title -!! options -language=zh variant=zh-tw showtitle +ISBN with trailing year (bug 8110) !! input -This should be stripped-{T|zh:China;zh-tw:Taiwan}-! -This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-. +ISBN 1-234-56789-0 - 2006 + +ISBN 1 234 56789 0 - 2006 !! result -Taiwan -

This should be stripped! -This won't take interferes with the title rule. +

ISBN 1-234-56789-0 - 2006 +

ISBN 1 234 56789 0 - 2006

!! end + !! test -Raw output of variant escape tags (R flag) -!! options -language=zh variant=zh-tw +anchorencode !! input -Raw: -{R|zh:China;zh-tw:Taiwan}- +{{anchorencode:foo bar©#%n}} !! result -

Raw: zh:China;zh-tw:Taiwan +

foo_bar.C2.A9.23.25n

!! end !! test -Nested using of manual convert syntax -!! options -language=zh variant=zh-hk +anchorencode trims spaces !! input -Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-! +{{anchorencode: __pretty__please__}} !! result -

Nested: Hello Hong Kong! +

pretty_please

!! end !! test -Do not convert roman numbers to language variants -!! options -language=sr variant=sr-ec +anchorencode deals with links !! input -Fridrih IV je car. +{{anchorencode: [[hello|world]] [[hi]]}} !! result -

Фридрих IV је цар. +

world_hi

!! end !! test -Unclosed language converter markup "-{" -!! options -language=sr +anchorencode deals with templates !! input --{T|hello +{{anchorencode: {{Foo}} }} !! result -

-{T|hello +

FOO

!! end !! test -Don't convert raw rule "-{R|=>}-" to "=>" -!! options -language=sr +anchorencode encodes like the TOC generator: (bug 18431) !! input --{R|=>}- -!! result -

=> +=== _ +:.3A%3A&&]] === +{{anchorencode: _ +:.3A%3A&&]] }} +__NOEDITSECTION__ +!! result +

_ +:.3A%3A&&]]

+

.2B:.3A.253A.26.26.5D.5D

-!!end - -!!article -Template:Bullet -!!text -* Bar -!!endarticle +!! end +# Expected output in the following test is not necessarily expected (there +# should probably be

tags inside the

in the output) -- it's +# only testing for well-formedness. !! test -Bug 529: Uncovered bullet +Bug 6200: blockquotes and paragraph formatting !! input -* Foo {{bullet}} -!! result -
  • Foo -
  • Bar -
+
+foo +
+bar + + baz +!! result +
+foo +
+

bar +

+
baz
+
!! end !! test -Bug 529: Uncovered table already at line-start +Bug 8293: Use of center tag ruins paragraph formatting !! input -x +
+foo +
-{{table}} -y +bar + + baz !! result -

x +

+

foo

- - - - - - -
1 2 -
3 4 -
-

y +

+

bar

+
baz
+
!! end + +### +### Language variants related tests +### !! test -Bug 529: Uncovered bullet in parser function result +Self-link in language variants +!! options +title=[[Dunav]] language=sr !! input -* Foo {{lc:{{bullet}} }} +Both [[Dunav]] and [[Дунав]] are names for this river. !! result -
  • Foo -
  • bar -
+

Both Dunav and Дунав are names for this river. +

+!!end -!! end !! test -Bug 5678: Double-parsed template argument +Link to pages in language variants +!! options +language=sr !! input -{{lc:{{{1}}}|hello}} +Main Page can be written as [[Маин Паге]] !! result -

{{{1}}} +

Main Page can be written as Маин Паге

-!! end +!!end + !! test -Bug 5678: Double-parsed template invocation +Multiple links to pages in language variants +!! options +language=sr !! input -{{lc:{{paramtest {{!}} param = hello }} }} +[[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]]. !! result -

{{paramtest | param = hello }} +

Main Page can be written as Маин Паге same as Маин Паге.

-!! end +!!end + !! test -Case insensitivity of parser functions for non-ASCII characters (bug 8143) +Simple template in language variants !! options -language=cs -title=[[Main Page]] +language=sr !! input -{{PRVNÍVELKÉ:ěščř}} -{{prvnívelké:ěščř}} -{{PRVNÍMALÉ:ěščř}} -{{prvnímalé:ěščř}} -{{MALÁ:ěščř}} -{{malá:ěščř}} -{{VELKÁ:ěščř}} -{{velká:ěščř}} +{{тест}} !! result -

Ěščř -Ěščř -ěščř -ěščř -ěščř -ěščř -ĚŠČŘ -ĚŠČŘ +

This is a test template

!! end + !! test -Morwen/13: Unclosed link followed by heading +Template with explicit namespace in language variants +!! options +language=sr !! input -[[link -==heading== +{{Template:тест}} !! result -

[[link +

This is a test template

-

[edit] heading

- !! end + !! test -HHP2.1: Heuristics for headings in preprocessor parenthetical structures +Basic test for template parameter in language variants +!! options +language=sr !! input -{{foo| -=heading= +{{парамтест|param=foo}} !! result -

{{foo| +

This is a test template with parameter foo

-

heading

- !! end + !! test -HHP2.2: Heuristics for headings in preprocessor parenthetical structures +Simple category in language variants +!! options +language=sr cat !! input -{{foo| -==heading== +[[Category:МедиаWики Усер'с Гуиде]] !! result -

{{foo| -

-

[edit] heading

- +MediaWiki User's Guide !! end + !! test -Tildes in comments +Stripping -{}- tags (language variants) !! options -pst +language=sr !! input - +Latin proverb: -{Ne nuntium necare}- !! result - +

Latin proverb: Ne nuntium necare +

!! end + !! test -Paragraphs inside divs (no extra line breaks) +Prevent conversion with -{}- tags (language variants) +!! options +language=sr variant=sr-ec !! input -
Line one - -Line two
+Latinski: -{Ne nuntium necare}- !! result -
Line one -Line two
- +

Латински: Ne nuntium necare +

!! end + !! test -Paragraphs inside divs (extra line break on open) +Prevent conversion of text with -{}- tags (language variants) +!! options +language=sr variant=sr-ec !! input -
-Line one - -Line two
+Latinski: -{Ne nuntium necare}- !! result -
-

Line one +

Латински: Ne nuntium necare

-Line two
- !! end + !! test -Paragraphs inside divs (extra line break on close) +Prevent conversion of links with -{}- tags (language variants) +!! options +language=sr variant=sr-ec !! input -
Line one - -Line two -
+-{[[Main Page]]}- !! result -
Line one -

Line two +

Main Page

-
- !! end + !! test -Paragraphs inside divs (extra line break on open and close) +-{}- tags within headlines (within html for parserConvert()) +!! options +language=sr variant=sr-ec !! input -
-Line one +== -{Naslov}- == +!! result +

[уреди] Naslov

+ +!! end -Line two -
+ +!! test +Explicit definition of language variant alternatives +!! options +language=zh variant=zh-tw +!! input +-{zh:China;zh-tw:Taiwan}-, not China !! result -
-

Line one -

Line two +

Taiwan, not China

-
- !! end + !! test -Nesting tags, paragraphs on lines which begin with
+Explicit session-wise language variant mapping (A flag and - flag) !! options -disabled +language=zh variant=zh-tw !! input -
A -B +Taiwan is not China. +But -{A|zh:China;zh-tw:Taiwan}- is China, +(This-{-|zh:China;zh-tw:Taiwan}- should be stripped!) +and -{China}- is China. !! result -
-

A -B +

Taiwan is not China. +But Taiwan is Taiwan, +(This should be stripped!) +and China is China.

!! end -# Bug 6200:
should behave like
with respect to line breaks !! test -Bug 6200: paragraphs inside blockquotes (no extra line breaks) +Explicit session-wise language variant mapping (H flag for hide) !! options -disabled +language=zh variant=zh-tw !! input -
Line one - -Line two
+(This-{H|zh:China;zh-tw:Taiwan}- should be stripped!) +Taiwan is China. !! result -
Line one -Line two
- +

(This should be stripped!) +Taiwan is Taiwan. +

!! end !! test -Bug 6200: paragraphs inside blockquotes (extra line break on open) +Adding explicit conversion rule for title (T flag) !! options -disabled +language=zh variant=zh-tw showtitle !! input -
-Line one - -Line two
+Should be stripped-{T|zh:China;zh-tw:Taiwan}-! !! result -
-

Line one +Taiwan +

Should be stripped!

-Line two
- !! end !! test -Bug 6200: paragraphs inside blockquotes (extra line break on close) +Testing that changing the language variant here in the tests actually works !! options -disabled +language=zh variant=zh showtitle !! input -
Line one - -Line two -
+Should be stripped-{T|zh:China;zh-tw:Taiwan}-! !! result -
Line one -

Line two +China +

Should be stripped!

-
- !! end !! test -Bug 6200: paragraphs inside blockquotes (extra line break on open and close) +Bug 24072: more test on conversion rule for title !! options -disabled +language=zh variant=zh-tw showtitle !! input -
-Line one - -Line two -
+This should be stripped-{T|zh:China;zh-tw:Taiwan}-! +This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-. !! result -
-

Line one -

Line two +Taiwan +

This should be stripped! +This won't take interferes with the title rule.

-
- !! end !! test -Paragraphs inside blockquotes/divs (no extra line breaks) +Raw output of variant escape tags (R flag) +!! options +language=zh variant=zh-tw !! input -
Line one - -Line two
+Raw: -{R|zh:China;zh-tw:Taiwan}- !! result -
Line one -Line two
- +

Raw: zh:China;zh-tw:Taiwan +

!! end !! test -Paragraphs inside blockquotes/divs (extra line break on open) +Nested using of manual convert syntax +!! options +language=zh variant=zh-hk !! input -
-Line one - -Line two
+Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-! !! result -
-

Line one +

Nested: Hello Hong Kong!

-Line two
- !! end !! test -Paragraphs inside blockquotes/divs (extra line break on close) +Do not convert roman numbers to language variants +!! options +language=sr variant=sr-ec !! input -
Line one - -Line two -
+Fridrih IV je car. !! result -
Line one -

Line two +

Фридрих IV је цар.

-
- !! end !! test -Paragraphs inside blockquotes/divs (extra line break on open and close) +Unclosed language converter markup "-{" +!! options +language=sr !! input -
-Line one - -Line two -
+-{T|hello !! result -
-

Line one -

Line two +

-{T|hello

-
- !! end !! test -Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion +Don't convert raw rule "-{R|=>}-" to "=>" !! options -wgLinkHolderBatchSize=0 +language=sr !! input -[[meatball:1]] -[[meatball:2]] -[[meatball:3]] -!! result -

meatball:1 -meatball:2 -meatball:3 +-{R|=>}- +!! result +

=>

-!! end +!!end + +!!article +Template:Bullet +!!text +* Bar +!!endarticle !! test -Free external link invading image caption +Bug 529: Uncovered bullet !! input -[[Image:Foobar.jpg|thumb|http://x|hello]] +* Foo {{bullet}} !! result -
hello
+
  • Foo +
  • Bar +
!! end !! test -Bug 15196: localised external link numbers -!! options -language=fa +Bug 529: Uncovered table already at line-start !! input -[http://en.wikipedia.org/] +x + +{{table}} +y !! result -

[Û±] +

x +

+ + + + + + +
1 2 +
3 4 +
+

y

!! end !! test -Multibyte character in padleft +Bug 529: Uncovered bullet in parser function result !! input -{{padleft:-Hello|7|Æ}} +* Foo {{lc:{{bullet}} }} !! result -

Æ-Hello -

+
  • Foo +
  • bar +
+ !! end !! test -Multibyte character in padright +Bug 5678: Double-parsed template argument !! input -{{padright:Hello-|7|Æ}} +{{lc:{{{1}}}|hello}} !! result -

Hello-Æ +

{{{1}}}

!! end !! test -Formatted date -!! config -wgUseDynamicDates=1 +Bug 5678: Double-parsed template invocation !! input -[[2009-03-24]] +{{lc:{{paramtest {{!}} param = hello }} }} !! result -

2009-03-24 +

{{paramtest | param = hello }}

-!!end +!! end -!!test -formatdate parser function -!!input -{{#formatdate:2009-03-24}} +!! test +Case insensitivity of parser functions for non-ASCII characters (bug 8143) +!! options +language=cs +title=[[Main Page]] +!! input +{{PRVNÍVELKÉ:ěščř}} +{{prvnívelké:ěščř}} +{{PRVNÍMALÉ:ěščř}} +{{prvnímalé:ěščř}} +{{MALÁ:ěščř}} +{{malá:ěščř}} +{{VELKÁ:ěščř}} +{{velká:ěščř}} !! result -

2009-03-24 +

Ěščř +Ěščř +ěščř +ěščř +ěščř +ěščř +ĚŠČŘ +ĚŠČŘ

!! end -!!test -formatdate parser function, with default format -!!input -{{#formatdate:2009-03-24|mdy}} +!! test +Morwen/13: Unclosed link followed by heading +!! input +[[link +==heading== !! result -

March 24, 2009 +

[[link

+

[edit] heading

+ !! end !! test -Linked date with autoformatting disabled -!! config -wgUseDynamicDates=false +HHP2.1: Heuristics for headings in preprocessor parenthetical structures !! input -[[2009-03-24]] +{{foo| +=heading= !! result -

2009-03-24 +

{{foo|

+

heading

+ !! end !! test -Spacing of numbers in formatted dates +HHP2.2: Heuristics for headings in preprocessor parenthetical structures !! input -{{#formatdate:January 15}} +{{foo| +==heading== !! result -

January 15 +

{{foo|

+

[edit] heading

+ !! end !! test -Spacing of numbers in formatted dates (linked) -!! config -wgUseDynamicDates=true +Tildes in comments +!! options +pst !! input -[[January 15]] + !! result -

January 15 -

+ !! end -# -# -# - -# -# Edit comments -# - !! test -Edit comment with link -!! options -comment +Paragraphs inside divs (no extra line breaks) !! input -I like the [[Main Page]] a lot +
Line one + +Line two
!! result -I like the Main Page a lot -!!end +
Line one +Line two
+ +!! end !! test -Edit comment with link and link text -!! options -comment +Paragraphs inside divs (extra line break on open) !! input -I like the [[Main Page|best pages]] a lot +
+Line one + +Line two
!! result -I like the best pages a lot -!!end +
+

Line one +

+Line two
+ +!! end !! test -Edit comment with link and link text with suffix -!! options -comment +Paragraphs inside divs (extra line break on close) !! input -I like the [[Main Page|best page]]s a lot +
Line one + +Line two +
!! result -I like the best pages a lot -!!end +
Line one +

Line two +

+
+ +!! end !! test -Edit comment with section link (non-local, eg in history list) -!! options -comment title=[[Main Page]] +Paragraphs inside divs (extra line break on open and close) !! input -/* External links */ removed bogus entries +
+Line one + +Line two +
!! result -→‎External links: removed bogus entries -!!end +
+

Line one +

Line two +

+
+ +!! end !! test -Edit comment with section link and text before it (non-local, eg in history list) +Nesting tags, paragraphs on lines which begin with
!! options -comment title=[[Main Page]] +disabled !! input -pre-comment text /* External links */ removed bogus entries +
A +B !! result -pre-comment text - →‎External links: removed bogus entries -!!end +
+

A +B +

+!! end +# Bug 6200:
should behave like
with respect to line breaks !! test -Edit comment with section link (local, eg in diff view) +Bug 6200: paragraphs inside blockquotes (no extra line breaks) !! options -comment local title=[[Main Page]] +disabled !! input -/* External links */ removed bogus entries +
Line one + +Line two
!! result -→‎External links: removed bogus entries -!!end +
Line one +Line two
+ +!! end !! test -Edit comment with subpage link (bug 14080) +Bug 6200: paragraphs inside blockquotes (extra line break on open) !! options -comment -subpage -title=[[Subpage test]] +disabled !! input -Poked at a [[/subpage]] here... +
+Line one + +Line two
!! result -Poked at a /subpage here... -!!end +
+

Line one +

+Line two
+ +!! end !! test -Edit comment with subpage link and link text (bug 14080) +Bug 6200: paragraphs inside blockquotes (extra line break on close) !! options -comment -subpage -title=[[Subpage test]] +disabled !! input -Poked at a [[/subpage|neat little page]] here... +
Line one + +Line two +
!! result -Poked at a neat little page here... -!!end +
Line one +

Line two +

+
+ +!! end !! test -Edit comment with bogus subpage link in non-subpage NS (bug 14080) +Bug 6200: paragraphs inside blockquotes (extra line break on open and close) !! options -comment -title=[[Subpage test]] +disabled !! input -Poked at a [[/subpage]] here... +
+Line one + +Line two +
!! result -Poked at a /subpage here... -!!end +
+

Line one +

Line two +

+
+ +!! end !! test -Edit comment with bare anchor link (local, as on diff) -!! options -comment -local -title=[[Main Page]] -!!input -[[#section]] +Paragraphs inside blockquotes/divs (no extra line breaks) +!! input +
Line one + +Line two
!! result -#section +
Line one +Line two
+ !! end !! test -Edit comment with bare anchor link (non-local, as on history) -!! options -comment -title=[[Main Page]] -!!input -[[#section]] +Paragraphs inside blockquotes/divs (extra line break on open) +!! input +
+Line one + +Line two
!! result -#section +
+

Line one +

+Line two
+ !! end !! test -Anchor starting with underscore -!!input -[[#_ref|One]] +Paragraphs inside blockquotes/divs (extra line break on close) +!! input +
Line one + +Line two +
!! result -

One +

Line one +

Line two

+
+ !! end !! test -Id starting with underscore -!!input -
+Paragraphs inside blockquotes/divs (extra line break on open and close) +!! input +
+Line one + +Line two +
!! result -
+
+

Line one +

Line two +

+
!! end !! test -Space normalisation on autocomment (bug 22784) +Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion !! options -comment -title=[[Main Page]] -!!input -/* __hello__world__ */ +wgLinkHolderBatchSize=0 +!! input +[[meatball:1]] +[[meatball:2]] +[[meatball:3]] !! result -→‎__hello__world__ +

meatball:1 +meatball:2 +meatball:3 +

!! end !! test -percent-encoding and + signs in comments (Bug 26410) -!! options -comment -!!input -[[ABC%33D% ++]] [[ABC%33D% ++|+%20]] +Free external link invading image caption +!! input +[[Image:Foobar.jpg|thumb|http://x|hello]] !! result -ABC3D% ++ +%20 +
hello
+ !! end !! test -Bad images - basic functionality +Bug 15196: localised external link numbers !! options -disabled +language=fa !! input -[[File:Bad.jpg]] +[http://en.wikipedia.org/] !! result +

[Û±] +

!! end !! test -Bad images - bug 16039: text after bad image disappears -!! options -disabled +Multibyte character in padleft !! input -Foo bar -[[File:Bad.jpg]] -Bar foo +{{padleft:-Hello|7|Æ}} !! result -

Foo bar -

Bar foo +

Æ-Hello

!! end !! test -Verify that displaytitle works (bug #22501) no displaytitle -!! options -showtitle -!! config -wgAllowDisplayTitle=true -wgRestrictDisplayTitle=false +Multibyte character in padright !! input -this is not the the title +{{padright:Hello-|7|Æ}} !! result -Parser test -

this is not the the title +

Hello-Æ

!! end !! test -Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false -!! options -showtitle -title=[[Screen]] +Formatted date !! config -wgAllowDisplayTitle=true -wgRestrictDisplayTitle=false +wgUseDynamicDates=1 !! input -this is not the the title -{{DISPLAYTITLE:whatever}} +[[2009-03-24]] !! result -whatever -

this is not the the title +

2009-03-24 +

+!!end + +!!test +formatdate parser function +!!input +{{#formatdate:2009-03-24}} +!! result +

2009-03-24

!! end -!! test -Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch -!! options -showtitle -title=[[Screen]] -!! config -wgAllowDisplayTitle=true -wgRestrictDisplayTitle=true -!! input -this is not the the title -{{DISPLAYTITLE:whatever}} +!!test +formatdate parser function, with default format +!!input +{{#formatdate:2009-03-24|mdy}} !! result -Screen -

this is not the the title +

March 24, 2009

!! end !! test -Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching -!! options -showtitle -title=[[Screen]] +Linked date with autoformatting disabled !! config -wgAllowDisplayTitle=true -wgRestrictDisplayTitle=true +wgUseDynamicDates=false !! input -this is not the the title -{{DISPLAYTITLE:screen}} +[[2009-03-24]] !! result -screen -

this is not the the title +

2009-03-24

!! end !! test -Verify that displaytitle works (bug #22501) AllowDisplayTitle=false -!! options -showtitle -title=[[Screen]] -!! config -wgAllowDisplayTitle=false +Spacing of numbers in formatted dates !! input -this is not the the title -{{DISPLAYTITLE:screen}} +{{#formatdate:January 15}} !! result -Screen -

this is not the the title -Template:DISPLAYTITLE:screen +

January 15

!! end !! test -Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE -!! options -showtitle -title=[[Screen]] +Spacing of numbers in formatted dates (linked) !! config -wgAllowDisplayTitle=false +wgUseDynamicDates=true !! input -this is not the the title +[[January 15]] !! result -Screen -

this is not the the title +

January 15

!! end - + +# +# +# + +# +# Edit comments +# + !! test -preload: check and +Edit comment with link !! options -preload +comment !! input -Hello cruelkind world. +I like the [[Main Page]] a lot !! result -Hello kind world. -!! end - +I like the Main Page a lot +!!end + !! test -preload: check +Edit comment with link and link text !! options -preload +comment !! input -Goodbye Hello world +I like the [[Main Page|best pages]] a lot !! result -Hello world -!! end +I like the best pages a lot +!!end !! test -preload: can pass tags through if we want to +Edit comment with link and link text with suffix !! options -preload +comment !! input -<includeonly>Hello world</includeonly> +I like the [[Main Page|best page]]s a lot !! result -Hello world -!! end +I like the best pages a lot +!!end !! test -preload: check that it doesn't try to do tricks +Edit comment with section link (non-local, eg in history list) !! options -preload +comment title=[[Main Page]] !! input -* ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}} +/* External links */ removed bogus entries !! result -* ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}} -!! end +→‎External links: removed bogus entries +!!end !! test -Play a bit with r67090 and bug 3158 +Edit comment with section link and text before it (non-local, eg in history list) !! options -disabled +comment title=[[Main Page]] !! input -
 
-
 
-
 
-
 
+pre-comment text /* External links */ removed bogus entries !! result -
 
-
 
-
 
-
 
- -!! end +pre-comment text - →‎External links: removed bogus entries +!!end !! test -HTML5 data attributes +Edit comment with section link (local, eg in diff view) +!! options +comment local title=[[Main Page]] !! input -Baz -

Quuz

+/* External links */ removed bogus entries !! result -

Baz -

-

Quuz

- -!! end +→‎External links: removed bogus entries +!!end !! test -percent-encoding and + signs in internal links (Bug 26410) -!! input -[[User:+%]] [[Page+title%]] -[[%+]] [[%+|%20]] [[%+ ]] [[%+r]] -[[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]] -[[%33%45]] [[%33%45+]] -!! result -

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

-!! end +Edit comment with subpage link (bug 14080) +!! options +comment +subpage +title=[[Subpage test]] +!! input +Poked at a [[/subpage]] here... +!! result +Poked at a /subpage here... +!!end !! test -Special characters in embedded file links (bug 27679) +Edit comment with subpage link and link text (bug 14080) +!! options +comment +subpage +title=[[Subpage test]] !! input -[[File:Contains & ampersand.jpg]] -[[File:Does not exist.jpg|Title with & ampersand]] +Poked at a [[/subpage|neat little page]] here... !! result -

File:Contains & ampersand.jpg -Title with & ampersand -

-!! end - +Poked at a neat little page here... +!!end !! test -Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4) +Edit comment with bogus subpage link in non-subpage NS (bug 14080) +!! options +comment +title=[[Subpage test]] !! input -Text's been normalized? +Poked at a [[/subpage]] here... !! result -

Text's been normalized? -

-!! end +Poked at a /subpage here... +!!end !! test -Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links -!! input -http://www.example.org/ <-- U+3000 (vim: ^Vu3000) +Edit comment with bare anchor link (local, as on diff) +!! options +comment +local +title=[[Main Page]] +!!input +[[#section]] !! result -

http://www.example.org/ <-- U+3000 (vim: ^Vu3000) -

+#section !! end !! test -Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links -!! input -[http://www.example.org/ ideograms] +Edit comment with bare anchor link (non-local, as on history) +!! options +comment +title=[[Main Page]] +!!input +[[#section]] !! result -

ideograms -

+#section !! end !! test -Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links -!! input -http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000) +Anchor starting with underscore +!!input +[[#_ref|One]] !! result -

pic.png <-- U+3000 (vim: ^Vu3000) +

One

!! end -!! article -Mediawiki:loop1 -!! text -{{Identical|A}} -!! endarticle - -!! article -Mediawiki:loop2 -!! text -{{Identical|B}} -!! endarticle - -!! article -Template:Identical -!! text -{{int:loop1}} -{{int:loop2}} -!! endarticle - !! test -Bug 31098 Template which includes system messages which includes the template -!! input -{{Identical}} +Id starting with underscore +!!input +
!! result -

Template loop detected: Template:Identical -Template loop detected: Template:Identical -

+
+ !! end !! test -Deprecated presentational attributes are converted to css -!! input -{| -| valign=top align=left width=100 height=25% | Asdf -|} -
    +Space normalisation on autocomment (bug 22784) +!! options +comment +title=[[Main Page]] +!!input +/* __hello__world__ */ !! result - - -
    Asdf -
    -
      - +→‎__hello__world__ !! end !! test -Bug31490 Turkish: ucfirst 'blah' +percent-encoding and + signs in comments (Bug 26410) !! options -language=tr -!! input -{{ucfirst:blah}} +comment +!!input +[[ABC%33D% ++]] [[ABC%33D% ++|+%20]] !! result -

      Blah -

      +ABC3D% ++ +%20 !! end !! test -Bug31490 Turkish: ucfirst 'ix' +Bad images - basic functionality !! options -language=tr +disabled !! input -{{ucfirst:ix}} +[[File:Bad.jpg]] !! result -

      Ä°x -

      !! end !! test -Bug31490 Turkish: lcfirst 'BLAH' +Bad images - bug 16039: text after bad image disappears !! options -language=tr +disabled !! input -{{lcfirst:BLAH}} +Foo bar +[[File:Bad.jpg]] +Bar foo !! result -

      bLAH +

      Foo bar +

      Bar foo

      !! end !! test -Bug31490 Turkish: ucfırst (with a dotless i) +Verify that displaytitle works (bug #22501) no displaytitle !! options -language=tr +showtitle +!! config +wgAllowDisplayTitle=true +wgRestrictDisplayTitle=false !! input -{{ucfırst:blah}} +this is not the the title !! result -

      Şablon:Ucfırst:blah +Parser test +

      this is not the the title

      !! end !! test -Bug31490 ucfırst (with a dotless i) with English language +Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false !! options -language=en +showtitle +title=[[Screen]] +!! config +wgAllowDisplayTitle=true +wgRestrictDisplayTitle=false !! input -{{ucfırst:blah}} +this is not the the title +{{DISPLAYTITLE:whatever}} !! result -

      Template:Ucfırst:blah +whatever +

      this is not the the title

      !! end !! test -Bug 26375: TOC with italics +Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch !! options -title=[[Main Page]] +showtitle +title=[[Screen]] +!! config +wgAllowDisplayTitle=true +wgRestrictDisplayTitle=true !! input -__TOC__ -== ''Lost'' episodes == +this is not the the title +{{DISPLAYTITLE:whatever}} !! result -

      Contents

      - -
      -

      [edit] Lost episodes

      - +Screen +

      this is not the the title +

      !! end !! test -Bug 26375: TOC with bold +Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching !! options -title=[[Main Page]] +showtitle +title=[[Screen]] +!! config +wgAllowDisplayTitle=true +wgRestrictDisplayTitle=true !! input -__TOC__ -== '''should be bold''' then normal text == +this is not the the title +{{DISPLAYTITLE:screen}} !! result -

      Contents

      - -
      -

      [edit] should be bold then normal text

      - +screen +

      this is not the the title +

      !! end !! test -Bug 33845: Headings become cursive in TOC when they contain an image +Verify that displaytitle works (bug #22501) AllowDisplayTitle=false !! options -title=[[Main Page]] +showtitle +title=[[Screen]] +!! config +wgAllowDisplayTitle=false !! input -__TOC__ -== Image [[Image:foobar.jpg]] == +this is not the the title +{{DISPLAYTITLE:screen}} !! result -

      Contents

      - -
      -

      [edit] Image Foobar.jpg

      - +Screen +

      this is not the the title +Template:DISPLAYTITLE:screen +

      !! end !! test -Bug 33845 (2): Headings become bold in TOC when they contain a blockquote +Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE !! options -title=[[Main Page]] +showtitle +title=[[Screen]] +!! config +wgAllowDisplayTitle=false !! input -__TOC__ -==
      Quote
      == -!! result -

      Contents

      - -
      -

      [edit]
      Quote

      - +this is not the the title +!! result +Screen +

      this is not the the title +

      !! end - + !! test -Unclosed tags in TOC +preload: check and !! options -title=[[Main Page]] +preload !! input -__TOC__ -== Proof: 2 < 3 == -Hanc marginis exiguitas non caperet. -QED +Hello cruelkind world. !! result -

      Contents

      - -
      -

      [edit] Proof: 2 < 3

      -

      Hanc marginis exiguitas non caperet. -QED -

      +Hello kind world. !! end - + !! test -Multiple tags in TOC +preload: check +!! options +preload !! input -__TOC__ -== Foo Bar == - -== Foo
      Bar
      == +Goodbye Hello world !! result -

      Contents

      - -
      -

      [edit] Foo Bar

      -

      [edit] Foo
      Bar

      - +Hello world !! end !! test -Tags with parameters in TOC +preload: can pass tags through if we want to +!! options +preload !! input -__TOC__ -== Hello == - -== Evilbye == +<includeonly>Hello world</includeonly> !! result -

      Contents

      - -
      -

      [edit] Hello

      -

      [edit] b">Evilbye

      - +Hello world !! end -!! article -MediaWiki:Bug32057 -!! text -== {{int:headline_sample}} == -!! endarticle - !! test -Bug 32057: Title needed when expanding nodes. +preload: check that it doesn't try to do tricks !! options -title=[[Main Page]] +preload !! input -{{int:Bug32057}} +* ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}} !! result -

      [edit] Headline text

      - +* ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}} !! end !! test -Strip marker in urlencode +Play a bit with r67090 and bug 3158 +!! options +disabled !! input -{{urlencode:xy}} -{{urlencode:xy|wiki}} -{{urlencode:xy|path}} +
       
      +
       
      +
       
      +
       
      !! result -

      xy -xy -xy -

      +
       
      +
       
      +
       
      +
       
      + !! end !! test -Strip marker in lc +HTML5 data attributes !! input -{{lc:xy}} +Baz +

      Quuz

      !! result -

      xy +

      Baz

      +

      Quuz

      + !! end !! test -Strip marker in uc +percent-encoding and + signs in internal links (Bug 26410) !! input -{{uc:xy}} +[[User:+%]] [[Page+title%]] +[[%+]] [[%+|%20]] [[%+ ]] [[%+r]] +[[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]] +[[%33%45]] [[%33%45+]] !! result -

      XY +

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

      !! end !! test -Strip marker in formatNum +Special characters in embedded file links (bug 27679) !! input -{{formatnum:12}} -{{formatnum:12|R}} +[[File:Contains & ampersand.jpg]] +[[File:Does not exist.jpg|Title with & ampersand]] !! result -

      12 -12 +

      File:Contains & ampersand.jpg +Title with & ampersand

      !! end + !! test -Strip marker in grammar -!! options -language=fi +Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4) !! input -{{grammar:elative|foobar}} +Text's been normalized? !! result -

      foobarista +

      Text's been normalized?

      !! end !! test -Strip marker in padleft +Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links !! input -{{padleft:|2|xy}} +http://www.example.org/ <-- U+3000 (vim: ^Vu3000) !! result -

      xy +

      http://www.example.org/ <-- U+3000 (vim: ^Vu3000)

      !! end !! test -Strip marker in padright +Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links !! input -{{padright:|2|xy}} +[http://www.example.org/ ideograms] !! result -

      xy +

      ideograms

      !! end !! test -Strip marker in anchorencode +Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links !! input -{{anchorencode:xy}} +http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000) !! result -

      xy +

      pic.png <-- U+3000 (vim: ^Vu3000)

      !! end -!! test -nowiki inside link inside heading (bug 18295) -!! input -==[[foo|xyz]]== -!! result -

      [edit] xyz

      +!! article +Mediawiki:loop1 +!! text +{{Identical|A}} +!! endarticle -!! end +!! article +Mediawiki:loop2 +!! text +{{Identical|B}} +!! endarticle + +!! article +Template:Identical +!! text +{{int:loop1}} +{{int:loop2}} +!! endarticle !! test -new support for bdi element (bug 31817) +Bug 31098 Template which includes system messages which includes the template !! input -

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

      +{{Identical}} !! result -

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

      - -!!end +

      Template loop detected: Template:Identical +Template loop detected: Template:Identical +

      +!! end !! test -Ignore pipe between table row attributes +Deprecated presentational attributes are converted to css !! input {| -| quux -|- id=foo | style='color: red' -| bar +| valign=top align=left width=100 height=25% | Asdf |} +
        !! result - - -
        quux -
        bar + Asdf
        +
          !! end -!!test -Gallery override link with WikiLink (bug 34852) +!! test +Bug31490 Turkish: ucfirst 'blah' +!! options +language=tr !! input - -File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink - +{{ucfirst:blah}} !! result - - !! end -!!test -Gallery override link with absolute external link (bug 34852) +!! test +Bug31490 Turkish: ucfirst 'ix' +!! options +language=tr !! input - -File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org - +{{ucfirst:ix}} !! result - - !! end -!!test -Gallery override link with malicious javascript (bug 34852) +!! test +Bug31490 Turkish: lcfirst 'BLAH' +!! options +language=tr !! input - -File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!'); - +{{lcfirst:BLAH}} !! result - - !! end -!!test -Language parser function +!! test +Bug31490 Turkish: ucfırst (with a dotless i) +!! options +language=tr !! input -{{#language:ar}} +{{ucfırst:blah}} !! result -

          العربية +

          Şablon:Ucfırst:blah

          !! end -!!test -Padleft and padright as substr +!! test +Bug31490 ucfırst (with a dotless i) with English language +!! options +language=en !! input -{{padleft:|3|abcde}} -{{padright:|3|abcde}} +{{ucfırst:blah}} !! result -

          abc -abc +

          Template:Ucfırst:blah

          !! end !! test -Definition Lists: No nesting: Multiple dd's +Bug 26375: TOC with italics +!! options +title=[[Main Page]] !! input -;x -:a -:b +__TOC__ +== ''Lost'' episodes == !! result -
          x -
          a -
          b -
          +

          Contents

          + +
          +

          [edit] Lost episodes

          !! end !! test -Definition Lists: Indentation: Regular +Bug 26375: TOC with bold +!! options +title=[[Main Page]] !! input -:i1 -::i2 -:::i3 +__TOC__ +== '''should be bold''' then normal text == !! result -
          i1 -
          i2 -
          i3 -
          -
          -
          +

          Contents

          + +
          +

          [edit] should be bold then normal text

          !! end !! test -Definition Lists: Indentation: Missing 1st level +Bug 33845: Headings become cursive in TOC when they contain an image +!! options +title=[[Main Page]] !! input -::i2 -:::i3 +__TOC__ +== Image [[Image:foobar.jpg]] == !! result -
          i2 -
          i3 -
          -
          -
          +

          Contents

          + +
          +

          [edit] Image Foobar.jpg

          !! end !! test -Definition Lists: Indentation: Multi-level indent +Bug 33845 (2): Headings become bold in TOC when they contain a blockquote +!! options +title=[[Main Page]] !! input -:::i3 +__TOC__ +==
          Quote
          == !! result -
          i3 -
          -
          -
          +

          Contents

          + +
          +

          [edit]
          Quote

          !! 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. - !! test -Definition Lists: Nesting: Multi-level (Parsoid only) +Unclosed tags in TOC !! options -disabled +title=[[Main Page]] !! input -;t1 :d1 -;;t2 ::d2 -;;;t3 :::d3 +__TOC__ +== Proof: 2 < 3 == +Hanc marginis exiguitas non caperet. +QED !! result -
          -
          t1
          -
          d1
          -
          -
          -
          t2
          -
          :d2
          -
          -
          -
          t3
          -
          ::d3
          -
          -
          -
          -
          -
          +

          Contents

          + +
          +

          [edit] Proof: 2 < 3

          +

          Hanc marginis exiguitas non caperet. +QED +

          +!! end +!! test +Multiple tags in TOC +!! input +__TOC__ +== Foo Bar == -!! end +== Foo
          Bar
          == +!! result +

          Contents

          + +
          +

          [edit] Foo Bar

          +

          [edit] Foo
          Bar

          +!! end !! test -Definition Lists: Nesting: Test 2 (Parsoid only) -!! options -disabled +Tags with parameters in TOC !! input -;t1 -::d2 +__TOC__ +== Hello == + +== Evilbye == !! result -
          -
          t1
          -
          -
          -
          d2
          -
          -
          -
          +

          Contents

          + +
          +

          [edit] Hello

          +

          [edit] b">Evilbye

          !! end +!! article +MediaWiki:Bug32057 +!! text +== {{int:headline_sample}} == +!! endarticle !! test -Definition Lists: Nesting: Test 3 (Parsoid only) +Bug 32057: Title needed when expanding nodes. !! options -disabled +title=[[Main Page]] !! input -:;t1 -::::d2 +{{int:Bug32057}} !! result -
          -
          -
          -
          t1
          -
          -
          -
          -
          -
          d2
          -
          -
          -
          -
          -
          -
          -
          +

          [edit] Headline text

          + +!! end +!! test +Strip marker in urlencode +!! input +{{urlencode:xy}} +{{urlencode:xy|wiki}} +{{urlencode:xy|path}} +!! result +

          xy +xy +xy +

          !! end - !! test -Definition Lists: Nesting: Test 4 +Strip marker in lc !! input -::;t3 -:::d3 +{{lc:xy}} !! result -
          t3 -
          d3 -
          -
          -
          - +

          xy +

          !! end - !! test -Definition Lists: Mixed Lists: Test 1 +Strip marker in uc !! input -:;* foo -::* bar -:; baz +{{uc:xy}} !! result -
          • foo -
          • bar -
          -
          -
          baz -
          -
          - +

          XY +

          !! end - !! test -Definition Lists: Mixed Lists: Test 2 +Strip marker in formatNum !! input -*: d1 -*: d2 +{{formatnum:12}} +{{formatnum:12|R}} !! result -
          • d1 -
            d2 -
            -
          - +

          12 +12 +

          !! end - !! test -Definition Lists: Mixed Lists: Test 3 +Strip marker in grammar +!! options +language=fi !! input -*::: d1 -*::: d2 +{{grammar:elative|foobar}} !! result -
          • d1 -
            d2 -
            -
            -
            -
          - +

          foobarista +

          !! end - !! test -Definition Lists: Mixed Lists: Test 4 +Strip marker in padleft !! input -*;d1 :d2 -*;d3 :d4 +{{padleft:|2|xy}} !! result -
          • d1 
            d2 -
            d3 
            d4 -
            -
          - +

          xy +

          !! end - !! test -Definition Lists: Mixed Lists: Test 5 +Strip marker in padright !! input -*:d1 -*:: d2 +{{padright:|2|xy}} !! result -
          • d1 -
            d2 -
            -
            -
          - +

          xy +

          !! end - !! test -Definition Lists: Mixed Lists: Test 6 +Strip marker in anchorencode !! input -#*:d1 -#*::: d3 +{{anchorencode:xy}} !! result -
            • d1 -
              d3 -
              -
              -
              -
            -
          - +

          xy +

          !! end - !! test -Definition Lists: Mixed Lists: Test 7 +nowiki inside link inside heading (bug 18295) !! input -:* d1 -:* d2 +==[[foo|xyz]]== !! result -
          • d1 -
          • d2 -
          -
          +

          [edit] xyz

          !! end - !! test -Definition Lists: Mixed Lists: Test 8 +new support for bdi element (bug 31817) !! input -:* d1 -::* d2 +

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

          !! result -
          • d1 -
          -
          • d2 -
          -
          -
          - -!! end +

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

          +!!end !! test -Definition Lists: Mixed Lists: Test 9 +Ignore pipe between table row attributes !! input -*;foo :bar +{| +| quux +|- id=foo | style='color: red' +| bar +|} !! result -
          • foo 
            bar -
            -
          + + + + +
          quux +
          bar +
          !! end - -!! test -Definition Lists: Mixed Lists: Test 10 +!!test +Gallery override link with WikiLink (bug 34852) !! input -*#;foo :bar + +File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink + !! result -
            1. foo 
              bar -
              -
            -
          + !! end - -!! test -Definition Lists: Mixed Lists: Test 11 +!!test +Gallery override link with absolute external link (bug 34852) !! input -*#*#;*;;foo :bar -*#*#;boo :baz + +File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org + !! result -
                1. foo 
                  • bar -
                    -
                  -
              - -
              boo 
              baz -
              -
            -
          - - + !! 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 -Definition Lists: Weird Ones: Test 1 +!!test +Language parser function !! input -*#;*::;; foo : bar (who uses this?) +{{#language:ar}} !! result -
            1. foo 
              • bar (who uses this?) -
                -
                -
                -
              -
          - - - +

          العربية +

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

          abc +abc +

          !! end + TODO: more images more tables -- 2.20.1