示例工程 appendix-a-lua55
appendix-a-lua55/01-global-declaration/_test.lua
-- @runtimes lua54 lua55
local h = require("harness")
local m = require("main")
h.describe("global 声明", function()
h.it("5.4 失败,5.5 成功", function()
local r = m.run(function() end)
if h.runtime() == "lua55" then
h.eq(r.ok, true)
h.eq(r.declared, true)
else
h.eq(r.ok, false)
end
end)
end)
h.run()