summaryrefslogtreecommitdiff
path: root/server-beta/test/diagnostics
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/test/diagnostics')
-rw-r--r--server-beta/test/diagnostics/init.lua47
1 files changed, 47 insertions, 0 deletions
diff --git a/server-beta/test/diagnostics/init.lua b/server-beta/test/diagnostics/init.lua
index 680d6bf6..2970938d 100644
--- a/server-beta/test/diagnostics/init.lua
+++ b/server-beta/test/diagnostics/init.lua
@@ -210,6 +210,44 @@ x(1, 2, <!3!>)
]]
TEST [[
+local function x(a, b, ...)
+ return a, b, ...
+end
+x(1, 2, 3, 4, 5)
+]]
+
+TEST [[
+local m = {}
+function m:x(a, b)
+ return a, b
+end
+m:x(1, 2, <!3!>)
+]]
+
+TEST [[
+local m = {}
+function m:x(a, b)
+ return a, b
+end
+m.x(1, 2, 3, <!4!>)
+]]
+
+TEST [[
+local m = {}
+function m.x(a, b)
+ return a, b
+end
+m:x(1, <!2!>, <!3!>, <!4!>)
+]]
+
+TEST [[
+local m = {}
+function m.x()
+end
+m:x()
+]]
+
+TEST [[
InstanceName = 1
Instance = _G[InstanceName]
]]
@@ -224,18 +262,27 @@ return [[
]]
]=]
+config.config.diagnostics.disable['unused-function'] = true
TEST [[
local mt, x
function mt:m()
function x:m()
end
end
+return mt, x
]]
TEST [[
local mt = {}
function mt:f()
end
+return mt
+]]
+
+TEST [[
+local <!mt!> = {}
+function mt:f()
+end
]]
TEST [[