mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Format Lua code
This commit is contained in:
parent
f5b24efdca
commit
a416125cdf
1 changed files with 9 additions and 3 deletions
|
@ -31,8 +31,12 @@ function M.runLocalTest(obj, name)
|
||||||
currentLocalTest = name
|
currentLocalTest = name
|
||||||
currentLocalTestError = nil
|
currentLocalTestError = nil
|
||||||
obj:sendEvent('runLocalTest', name)
|
obj:sendEvent('runLocalTest', name)
|
||||||
while currentLocalTest do coroutine.yield() end
|
while currentLocalTest do
|
||||||
if currentLocalTestError then error(currentLocalTestError, 2) end
|
coroutine.yield()
|
||||||
|
end
|
||||||
|
if currentLocalTestError then
|
||||||
|
error(currentLocalTestError, 2)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.expect(cond, delta, msg)
|
function M.expect(cond, delta, msg)
|
||||||
|
@ -198,7 +202,9 @@ M.eventHandlers = {
|
||||||
end
|
end
|
||||||
localTestRunner = coroutine.create(function()
|
localTestRunner = coroutine.create(function()
|
||||||
local status, err = pcall(fn)
|
local status, err = pcall(fn)
|
||||||
if status then err = nil end
|
if status then
|
||||||
|
err = nil
|
||||||
|
end
|
||||||
core.sendGlobalEvent('localTestFinished', {name=name, errMsg=err})
|
core.sendGlobalEvent('localTestFinished', {name=name, errMsg=err})
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue