示例工程 15-index-and-newindex

15-index-and-newindex/01-readonly-table/_test.lua

lua · 0.3 KB

-- @runtimes lua54 luajit
local h = require("harness")
local m = require("main")
h.describe("只读表", function()
	h.it("读代理值,写被阻止", function()
		local r = m.run(function() end)
		h.eq(r.value, 8080)
		h.eq(r.blocked, true)
	end)
end)
h.run()