Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/142431
Change subject: Add parser test for "extra interlanguage links". ...................................................................... Add parser test for "extra interlanguage links". This support was added in https://gerrit.wikimedia.org/r/111390 Bug: 32189 Change-Id: I299ce844919b3f20b3ce116adf64b37dd95325d0 --- M tests/parser/parserTest.inc M tests/parser/parserTests.txt M tests/phpunit/includes/parser/NewParserTest.php 3 files changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/142431/1 diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index 5d52160..6c8a401 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -153,6 +153,7 @@ global $wgParser, $wgParserConf, $IP, $messageMemc, $wgMemc, $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache, $wgExtraNamespaces, $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo, + $wgExtraInterlanguageLinkPrefixes, $parserMemc, $wgThumbnailScriptPath, $wgScriptPath, $wgArticlePath, $wgScript, $wgStylePath, $wgExtensionAssetsPath, $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgLockManagers; @@ -223,6 +224,9 @@ if ( $wgStyleDirectory === false ) { $wgStyleDirectory = "$IP/skins"; } + // "extra language links" + // see https://gerrit.wikimedia.org/r/111390 + array_push( $wgExtraInterlanguageLinkPrefixes, 'mul' ); self::setupInterwikis(); } @@ -276,6 +280,11 @@ 'iw_api' => '', 'iw_wikiid' => '', 'iw_local' => 1 ), + 'mul' => array( + 'iw_url' => 'http://wikisource.org/wiki/$1', + 'iw_api' => '', + 'iw_wikiid' => '', + 'iw_local' => 1 ), ); if ( array_key_exists( $prefix, $testInterwikis ) ) { $iwData = $testInterwikis[$prefix]; diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 03e4959..b8ba403 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -6414,6 +6414,16 @@ !! end !! test +"Extra" interlanguage links (bug 32189 / gerrit 111390) +!! wikitext +Blah blah blah +[[mul:Multilingual]] +!! html +<p>Blah blah blah +</p> +!! end + +!! test Parsoid-specific test: Wikilinks with should RT properly !! options language=ln diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 5c42fae..4c72d1c 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -148,6 +148,10 @@ # proper precedence when resolving links. (bug 51680) $tmpGlobals['wgExtraNamespaces'] = array( 100 => 'MemoryAlpha' ); + # "extra language links" + # see https://gerrit.wikimedia.org/r/111390 + $tmpGlobals['wgExtraInterlanguageLinkPrefixes'] = array( 'mul' ); + //DjVu support $this->djVuSupport = new DjVuSupport(); -- To view, visit https://gerrit.wikimedia.org/r/142431 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I299ce844919b3f20b3ce116adf64b37dd95325d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Cscott <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
