2014-07-10 19:21:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once( __DIR__ . '/UstringLibraryTest.php' );
|
|
|
|
|
|
|
|
class Scribunto_LuaUstringLibraryPureLuaTests extends Scribunto_LuaUstringLibraryTests {
|
2014-11-12 11:21:38 +00:00
|
|
|
protected function setUp() {
|
2014-07-10 19:21:58 +00:00
|
|
|
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' )
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|