summaryrefslogtreecommitdiff
path: root/server-beta/test
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/test')
-rw-r--r--server-beta/test/diagnostics/init.lua23
1 files changed, 19 insertions, 4 deletions
diff --git a/server-beta/test/diagnostics/init.lua b/server-beta/test/diagnostics/init.lua
index aaf51987..40f605e6 100644
--- a/server-beta/test/diagnostics/init.lua
+++ b/server-beta/test/diagnostics/init.lua
@@ -297,13 +297,28 @@ return [[
]]
]=]
+config.config.diagnostics.disable['unused-local'] = true
TEST [[
-local t = {}
-<!function t:x()
-end!>
-return t
+local f = <!function () end!>
+]]
+
+TEST [[
+local f;f = <!function () end!>
+]]
+
+TEST [[
+<!local function f() end!>
+]]
+
+TEST [[
+F = <!function () end!>
+]]
+
+TEST [[
+<!function F() end!>
]]
+config.config.diagnostics.disable['unused-local'] = false
config.config.diagnostics.disable['unused-function'] = true
TEST [[
local mt, x