From 5ec8ad22d27051507c55d49d6144f08132976215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 25 Nov 2021 21:38:57 +0800 Subject: cleanup --- test/diagnostics/init.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'test/diagnostics/init.lua') diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua index 558ffc26..3dfd6518 100644 --- a/test/diagnostics/init.lua +++ b/test/diagnostics/init.lua @@ -4,9 +4,9 @@ local config = require 'config' local util = require 'utility' local catch = require 'catch' -config.get 'Lua.diagnostics.neededFileStatus'['deprecated'] = 'Any' -config.get 'Lua.diagnostics.neededFileStatus'['type-check'] = 'Any' -config.get 'Lua.diagnostics.neededFileStatus'['await-in-sync'] = 'Any' +config.get(nil, 'Lua.diagnostics.neededFileStatus')['deprecated'] = 'Any' +config.get(nil, 'Lua.diagnostics.neededFileStatus')['type-check'] = 'Any' +config.get(nil, 'Lua.diagnostics.neededFileStatus')['await-in-sync'] = 'Any' rawset(_G, 'TEST', true) @@ -177,7 +177,7 @@ local _ENV = { print = print } print(1) ]] -config.get 'Lua.diagnostics.disable'['undefined-env-child'] = true +config.get(nil, 'Lua.diagnostics.disable')['undefined-env-child'] = true TEST [[ _ENV = nil = 1 --> _ENV.GLOBAL = 1 @@ -203,7 +203,7 @@ GLOBAL = 1 _ENV = nil ]] -config.get 'Lua.diagnostics.disable'['undefined-env-child'] = nil +config.get(nil, 'Lua.diagnostics.disable')['undefined-env-child'] = nil TEST [[ :sub(1, 1) @@ -315,17 +315,17 @@ return [[ ]] ]=] -config.get 'Lua.diagnostics.disable'['close-non-object'] = true +config.get(nil, 'Lua.diagnostics.disable')['close-non-object'] = true TEST [[ local _ = function () end ]] -config.get 'Lua.diagnostics.disable'['close-non-object'] = nil +config.get(nil, 'Lua.diagnostics.disable')['close-non-object'] = nil TEST [[ local _ = ]] -config.get 'Lua.diagnostics.disable'['unused-local'] = true +config.get(nil, 'Lua.diagnostics.disable')['unused-local'] = true TEST [[ local f = ]] @@ -338,7 +338,7 @@ TEST [[ local ]] -config.get 'Lua.diagnostics.disable'['unused-local'] = nil +config.get(nil, 'Lua.diagnostics.disable')['unused-local'] = nil TEST [[ local mt, x function mt:m() @@ -1427,7 +1427,7 @@ end X = f() ]] -config.get 'Lua.diagnostics.neededFileStatus'['not-yieldable'] = 'Any' +config.get(nil, 'Lua.diagnostics.neededFileStatus')['not-yieldable'] = 'Any' TEST [[ local function f(cb) return cb -- cgit v1.2.3