Make luacheck happy

This commit is contained in:
luk3yx 2023-04-19 12:51:42 +12:00
parent c7629b718d
commit 775d5e6f9d
2 changed files with 5 additions and 2 deletions

View File

@ -50,7 +50,7 @@ to either fix bugs in formspec_ast or for implementing new formspec features.
#### April 2023 #### April 2023
- The `current_tab` value of dropdowns is now parsed as a number. - The `current_tab` value of tabheader elements is now parsed as a number.
#### February 2022 #### February 2022

View File

@ -1,5 +1,7 @@
dofile('init.lua') dofile('init.lua')
-- luacheck: read_globals assert it describe
local function test_parse(fs, expected_tree) local function test_parse(fs, expected_tree)
-- Make single elements lists and add formspec_version -- Make single elements lists and add formspec_version
if expected_tree.type then if expected_tree.type then
@ -530,7 +532,8 @@ it("flattens formspecs correctly", function()
end) end)
it("interprets invsize[] and escapes correctly", function() it("interprets invsize[] and escapes correctly", function()
assert.equals(assert(formspec_ast.interpret('invsize[12,34]')), 'size[12,34]') assert.equals(assert(formspec_ast.interpret('invsize[12,34]')),
'size[12,34]')
assert.equals(assert(formspec_ast.interpret('label[1,2;abc\\')), assert.equals(assert(formspec_ast.interpret('label[1,2;abc\\')),
'label[1,2;abc]') 'label[1,2;abc]')