mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-19 03:12:52 +00:00
61af67b819
Required for Idf44d31. Change-Id: If6d270549290bed2d1c7617da0fedbd385f3e96c
21 lines
577 B
PHP
21 lines
577 B
PHP
<?php
|
|
|
|
require_once( __DIR__ . '/UstringLibraryTest.php' );
|
|
|
|
class Scribunto_LuaUstringLibraryPureLuaTests extends Scribunto_LuaUstringLibraryTests {
|
|
protected function setUp() {
|
|
parent::setUp();
|
|
|
|
// Override mw.ustring with the pure-Lua version
|
|
$interpreter = $this->getEngine()->getInterpreter();
|
|
$interpreter->callFunction(
|
|
$interpreter->loadString( '
|
|
local ustring = require( "ustring" )
|
|
ustring.maxStringLength = mw.ustring.maxStringLength
|
|
ustring.maxPatternLength = mw.ustring.maxPatternLength
|
|
mw.ustring = ustring
|
|
', 'fortest' )
|
|
);
|
|
}
|
|
}
|