diff --git a/tests/lua-5.3/logical_operations.lua b/tests/lua-5.3/logical_operations.lua new file mode 100644 index 0000000..c9176c8 --- /dev/null +++ b/tests/lua-5.3/logical_operations.lua @@ -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_) \ No newline at end of file diff --git a/tests/test.js b/tests/test.js index 9406ea5..1d18745 100644 --- a/tests/test.js +++ b/tests/test.js @@ -24,6 +24,7 @@ let exitCode = 0 }) luaEnv.parseFile('goto.lua').exec() luaEnv.parseFile('bwcoercion.lua').exec() + luaEnv.parseFile('logical_operations.lua').exec() } {