# The parsoid-compatible option below is only relevant when we are running # parser tests in integrated mode with Parsoid. This option is ignored # when this test file is run with Parsoid in standalone mode. !! options parsoid-compatible=wt2html,wt2wt version=2 !! end # This is the standard article assumed to exist. !! article Main Page !! text blah blah !! endarticle !!article Foo !!text FOO !!endarticle !!article Template:Foo !!text FOO !!endarticle ### Interwiki links (see maintenance/interwiki.sql) !! test Inline interwiki link !! options parsoid=wt2html,wt2wt,html2html !! wikitext [[MeatBall:SoftSecurity]] !! html/php

MeatBall:SoftSecurity

!! html/parsoid

MeatBall:SoftSecurity

!! end !! test Inline interwiki link with empty title (T4372) !! options parsoid=wt2html,wt2wt,html2html !! wikitext [[MeatBall:]] !! html/php

MeatBall:

!! html/parsoid

MeatBall:

!! end ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia: !! test Interwiki link encoding conversion (T3636) !! options parsoid=wt2html,wt2wt !! wikitext *[[Wikipedia:ro:Olteniţa]] *[[Wikipedia:ro:Olteniţa]] !! html/php !! html/parsoid !! end !! test Interwiki link with fragment (T4130) !! wikitext [[MeatBall:SoftSecurity#foo]] !! html

MeatBall:SoftSecurity#foo

!! end ## The interwiki case here continued to be legacy escaped because of the ## default setting of $wgExternalInterwikiFragmentMode !! test Link scenarios with escaped fragments !! options title=[[Main Page]] !! config wgFragmentMode=[ "html5", "legacy" ] !! wikitext [[#Is this great?]] [[Foo#Is this great?]] [[meatball:Foo#Is this great?]] !! html/php

#Is this great? Foo#Is this great? meatball:Foo#Is this great?

!! html/parsoid

#Is this great? Foo#Is this great? meatball:Foo#Is this great?

!! end !! test Link scenarios with escaped fragments (legacy) !! config wgFragmentMode=[ "legacy" ] !! wikitext [[#Is this great?]] [[Foo#Is this great?]] [[meatball:Foo#Is this great?]] !! html/php

#Is this great? Foo#Is this great? meatball:Foo#Is this great?

!! end # Ideally the wikipedia: prefix here should be proto-relative too # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't # define the 'en' prefix, and originally the test used 'wikipedia', # which isn't a localinterwiki prefix hence the links to the 'en:Foo' # article. !! test Different interwiki prefixes mapping to the same URL !! wikitext [[:en:Foo]] [[:en:Foo|Foo]] [[wikipedia:Foo]] [[:wikipedia:Foo|Foo]] [[wikipedia:en:Foo]] [[:wikipedia:en:Foo]] [[ wikiPEdia :Foo]] !! html/parsoid

en:Foo

Foo

wikipedia:Foo

Foo

wikipedia:en:Foo

wikipedia:en:Foo

wikiPEdia :Foo

!! end !! test Interwiki links that cannot be represented in wiki syntax !! wikitext [[meatball:ok]] [[meatball:ok#foo|ok with fragment]] [[meatball:ok_as_well?|ok ending with ? mark]] [http://de.wikipedia.org/wiki/Foo?action=history has query] [http://de.wikipedia.org/wiki/#foo is just fragment] !! html/php

meatball:ok ok with fragment ok ending with ? mark has query is just fragment

!! html/parsoid

meatball:ok ok with fragment ok ending with ? mark has query is just fragment

!! end !! test Interwiki links: trail !! wikitext [[wikipedia:Foo|Ba]]r !! html/php

Bar

!! html/parsoid

Bar

!! end !! test Local interwiki link !! options parsoid=wt2html,wt2wt,html2html !! wikitext [[local:Template:Foo]] !! html/php

local:Template:Foo

!! html/parsoid

local:Template:Foo

!! end # Parsoid does not mark self-links, by design. !! test Local interwiki link: self-link to current page !! options title=[[Main Page]] parsoid=wt2html,wt2wt,html2html !! wikitext [[local:Main Page]] !! html/php

local:Main Page

!! html/parsoid

local:Main Page

!! end !! test Local interwiki link: prefix only (T66167) !! options parsoid=wt2html,wt2wt,html2html !! wikitext [[local:]] !! html/php

local:

!! html/parsoid

local:

!! end !! test Local interwiki link: with additional interwiki prefix (T63357) !! options parsoid=wt2html,wt2wt,html2html !! wikitext [[local:meatball:Hello]] !! html/php

local:meatball:Hello

!! html/parsoid

local:meatball:Hello

!! end !! test Multiple local interwiki link prefixes !! wikitext [[local:local:local:local:mi:local:Foo]] !! options parsoid=wt2html,wt2wt,html2html !! html/php

local:local:local:local:mi:local:Foo

!! html/parsoid

local:local:local:local:mi:local:Foo

!! end !! test Interwiki link that could be a language link, if not for a local interwiki prefix (T292022) !! options parsoid=html2wt !! html/php

local:es:Hello

!! html/parsoid

local:es:Hello

!! wikitext [[:es:Hello|local:es:Hello]] !! end !! test Internal link with a namespace matching a local interwiki prefix (T228616) !! options parsoid=html2wt !! html/php

Project:Hello

!! html/parsoid

Project:Hello

!! wikitext [[Project:Hello]] !! end !! test Interwiki link with percent encoded target !! wikitext [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]] !! html/php

Nueva Guipúzcoa

!! html/parsoid

Nueva Guipúzcoa

!! end !! test Interwiki link with colon escape after prefix !! wikitext [[meatball::Category:Hello]] !! html/php

meatball::Category:Hello

!! html/parsoid

meatball:Category:Hello

!! end