summaryrefslogtreecommitdiff
path: root/test/diagnostics/unused-local.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/diagnostics/unused-local.lua')
-rw-r--r--test/diagnostics/unused-local.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/diagnostics/unused-local.lua b/test/diagnostics/unused-local.lua
index 1faace25..425f3e1e 100644
--- a/test/diagnostics/unused-local.lua
+++ b/test/diagnostics/unused-local.lua
@@ -1,3 +1,5 @@
+local config = require 'config'
+
TEST [[
local <!x!>
]]
@@ -84,3 +86,14 @@ TEST [[
local <!t!> = {}
<!t!>[1] = 1
]]
+
+config.add(nil, 'Lua.diagnostics.unusedLocalExclude', 'll_*')
+
+TEST [[
+local <!xx!>
+local ll_1
+local ll_2
+local <!ll!>
+]]
+
+config.remove(nil, 'Lua.diagnostics.unusedLocalExclude', 'll_*')