mediawiki-extensions-Scribunto/tests/phpunit/engines/LuaSandbox/SandboxTests.lua
Reedy 664c866980 Use tab indenting consistently
Change-Id: I7387882d8ece9bb7f2eac8891c010a2fcb0a57b0
2020-10-23 16:39:12 +01:00

19 lines
452 B
Lua

local testframework = require( 'Module:TestFramework' )
local function setfenv1()
setfenv( 10, {} )
end
local function getfenv1()
assert( getfenv( 10 ) == nil )
end
return testframework.getTestProvider( {
{ name = 'setfenv invalid level', func = setfenv1,
expect = "bad argument #1 to 'old_getfenv' (invalid level)",
},
{ name = 'getfenv invalid level', func = getfenv1,
expect = "bad argument #1 to 'old_getfenv' (invalid level)",
},
} )