mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-16 21:27:10 +00:00
Forbid mutating empty_json_array
It's definitely still possible (rawset), but should prevent people accidentally trying to modify it when they shouldn't.
This commit is contained in:
@@ -20,6 +20,13 @@ describe("The textutils library", function()
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("textutils.empty_json_array", function()
|
||||
it("is immutable", function()
|
||||
expect.error(function() textutils.empty_json_array[1] = true end)
|
||||
:eq("textutils_spec.lua:25: attempt to mutate textutils.empty_json_array")
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("textutils.unserialise", function()
|
||||
it("validates arguments", function()
|
||||
textutils.unserialise("")
|
||||
|
||||
Reference in New Issue
Block a user