test logical short-circuit cases (#27)

pull/28/head
Sodium-Aluminate 7 months ago
parent fb6158a1c0
commit aa3deef01b

@ -0,0 +1,6 @@
local x = nil
local x_ = (x and x.k or "fallback")
assert(x_ == "fallback")
local y = "ok"
local y_ = (y or error("should not raise"))
assert(y == y_)

@ -24,6 +24,7 @@ let exitCode = 0
})
luaEnv.parseFile('goto.lua').exec()
luaEnv.parseFile('bwcoercion.lua').exec()
luaEnv.parseFile('logical_operations.lua').exec()
}
{

Loading…
Cancel
Save