# 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
!! html/parsoid !! end !! test Inline interwiki link with empty title (T4372) !! options parsoid=wt2html,wt2wt,html2html !! wikitext [[MeatBall:]] !! html/php !! html/parsoid !! 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 # Note that fragment is suppressed in metadata !! test Interwiki link with fragment (T4130) !! options iwl !! metadata iwl=meatball:SoftSecurity iwl=meatball:Soft !! wikitext [[MeatBall:SoftSecurity#foo]] [[meatball:Soft#Bar]] !! html/php !! html/parsoid !! end ## The non-local interwiki case here continues 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?]] [[:en:Foo#Is this great?]] !! html/php#Is this great? Foo#Is this great? meatball:Foo#Is this great? en:Foo#Is this great?
!! html/parsoid#Is this great? Foo#Is this great? meatball:Foo#Is this great? en: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 !! 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/phpmeatball:ok ok with fragment ok ending with ? mark has query is just fragment
!! html/parsoidmeatball: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 !! html/parsoid !! end !! test Local interwiki link !! options parsoid=wt2html,wt2wt,html2html !! wikitext [[local:Template:Foo]] !! html/php !! html/parsoid !! end !! test Local interwiki link: self-link to current page !! options title=[[Main Page]] parsoid=wt2html,wt2wt,html2html !! wikitext [[local:Main Page]] !! html/php !! html/parsoid !! end !! test Local interwiki link: prefix only (T66167) !! options parsoid=wt2html,wt2wt,html2html !! wikitext [[local:]] !! html/php !! html/parsoid !! end !! test Local interwiki link: with additional interwiki prefix (T63357) !! options parsoid=wt2html,wt2wt,html2html !! wikitext [[local:meatball:Hello]] !! html/php !! html/parsoid !! end !! test Multiple local interwiki link prefixes !! wikitext [[local:local:local:local:mi:local:Foo]] !! options parsoid=wt2html,wt2wt,html2html !! html/phplocal:local:local:local:mi:local:Foo
!! html/parsoid !! end !! test Interwiki link that could be a language link, if not for a local interwiki prefix (T292022) !! options parsoid=html2wt !! html/php !! html/parsoid !! wikitext [[:es:Hello|local:es:Hello]] !! end !! test Internal link with a namespace matching a local interwiki prefix (T228616) !! options parsoid=html2wt !! html/php !! html/parsoid !! wikitext [[Project:Hello]] !! end !! test {{#interwikilink}} parser function as a means to force an interwiki link (T363538) !! options iwl !! wikitext [[Project:Hello World]] {{#interwikilink:Project|Hello World}} {{#interwikilink:Project|Hello World 2|caption text}} !! metadata iwl=Project:Hello_World iwl=Project:Hello_World_2 !! html/php !! html/parsoid+integrated !! end !! test Interwiki link with percent encoded target !! wikitext [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]] !! html/php !! html/parsoid !! end !! test Interwiki link with colon escape after prefix !! wikitext [[meatball::Category:Hello]] !! html/php !! html/parsoid !! end !! test Self-links and interwiki !! options title=[[Main Page]] !! wikitext [[local:Main Page]] [[meatball:Main Page]] [[mi:Main Page]] [[local:Main Page#anchor]] [[meatball:Main Page#anchor]] !! html/php !! html/parsoid !! end