diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-01 16:31:18 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-01 16:31:18 +0800 |
commit | 3011a124fe961bb623fa627abfd64030f128b4c1 (patch) | |
tree | db3715606e005dd5a444356c58cb3e36f488179a /test | |
parent | 329e2d7dfa0268a6288086f1a2e3581d5b31cfc6 (diff) | |
download | lua-language-server-3011a124fe961bb623fa627abfd64030f128b4c1.zip |
cleanup
Diffstat (limited to 'test')
-rw-r--r-- | test/completion/init.lua | 8 | ||||
-rw-r--r-- | test/crossfile/completion.lua | 12 | ||||
-rw-r--r-- | test/crossfile/definition.lua | 12 | ||||
-rw-r--r-- | test/diagnostics/init.lua | 14 | ||||
-rw-r--r-- | test/full/example.lua | 2 | ||||
-rw-r--r-- | test/full/init.lua | 4 | ||||
-rw-r--r-- | test/full/projects.lua | 4 | ||||
-rw-r--r-- | test/type_inference/init.lua | 8 |
8 files changed, 32 insertions, 32 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua index 4a04ecc5..ca88af07 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -109,9 +109,9 @@ function TEST(script) end end -config.config.completion.callSnippet = 'Both' -config.config.completion.keywordSnippet = 'Both' -config.config.completion.workspaceWord = false +config.Lua.completion.callSnippet = 'Both' +config.Lua.completion.keywordSnippet = 'Both' +config.Lua.completion.workspaceWord = false TEST [[ local zabcde @@ -920,7 +920,7 @@ print(io.$) ]] (EXISTS) -require 'config' .config.runtime.version = 'Lua 5.4' +require 'config' .Lua.runtime.version = 'Lua 5.4' --TEST [[ --local $ --]] diff --git a/test/crossfile/completion.lua b/test/crossfile/completion.lua index 15ce3440..3be26b5a 100644 --- a/test/crossfile/completion.lua +++ b/test/crossfile/completion.lua @@ -359,8 +359,8 @@ TEST { } -local originRuntimePath = config.config.runtime.path -config.config.runtime.path = { +local originRuntimePath = config.Lua.runtime.path +config.Lua.runtime.path = { '?/1.lua', } @@ -388,10 +388,10 @@ TEST { } } -config.config.runtime.path = originRuntimePath +config.Lua.runtime.path = originRuntimePath -local originRuntimePath = config.config.runtime.path -config.config.runtime.path = { +local originRuntimePath = config.Lua.runtime.path +config.Lua.runtime.path = { 'd:/?/1.lua', } @@ -414,7 +414,7 @@ TEST { } } -config.config.runtime.path = originRuntimePath +config.Lua.runtime.path = originRuntimePath TEST { { diff --git a/test/crossfile/definition.lua b/test/crossfile/definition.lua index d1b613cc..cbb5f7fe 100644 --- a/test/crossfile/definition.lua +++ b/test/crossfile/definition.lua @@ -730,8 +730,8 @@ TEST { } platform.OS = originOS -local originRuntimePath = config.config.runtime.path -config.config.runtime.path = { +local originRuntimePath = config.Lua.runtime.path +config.Lua.runtime.path = { '?/1.lua', } TEST { @@ -749,10 +749,10 @@ TEST { ]], }, } -config.config.runtime.path = originRuntimePath +config.Lua.runtime.path = originRuntimePath -local originRuntimePath = config.config.runtime.path -config.config.runtime.path = { +local originRuntimePath = config.Lua.runtime.path +config.Lua.runtime.path = { 'D:/?/1.lua', } TEST { @@ -770,7 +770,7 @@ TEST { ]], }, } -config.config.runtime.path = originRuntimePath +config.Lua.runtime.path = originRuntimePath TEST { { diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua index b00a4e21..cb314691 100644 --- a/test/diagnostics/init.lua +++ b/test/diagnostics/init.lua @@ -4,7 +4,7 @@ local config = require 'config' local util = require 'utility' local define = require 'proto.define' -config.config.diagnostics.neededFileStatus['deprecated'] = 'Any' +config.Lua.diagnostics.neededFileStatus['deprecated'] = 'Any' rawset(_G, 'TEST', true) @@ -206,7 +206,7 @@ local _ENV = { print = print } print(1) ]] -config.config.diagnostics.disable['undefined-env-child'] = true +config.Lua.diagnostics.disable['undefined-env-child'] = true TEST [[ _ENV = nil <!GLOBAL!> = 1 --> _ENV.GLOBAL = 1 @@ -232,7 +232,7 @@ GLOBAL = 1 _ENV = nil ]] -config.config.diagnostics.disable['undefined-env-child'] = nil +config.Lua.diagnostics.disable['undefined-env-child'] = nil TEST [[ <!print() ('string')!>:sub(1, 1) @@ -344,17 +344,17 @@ return [[ ]] ]=] -config.config.diagnostics.disable['close-non-object'] = true +config.Lua.diagnostics.disable['close-non-object'] = true TEST [[ local _ <close> = function () end ]] -config.config.diagnostics.disable['close-non-object'] = nil +config.Lua.diagnostics.disable['close-non-object'] = nil TEST [[ local _ <close> = <!1!> ]] -config.config.diagnostics.disable['unused-local'] = true +config.Lua.diagnostics.disable['unused-local'] = true TEST [[ local f = <!function () end!> ]] @@ -367,7 +367,7 @@ TEST [[ local <!function f() end!> ]] -config.config.diagnostics.disable['unused-local'] = nil +config.Lua.diagnostics.disable['unused-local'] = nil TEST [[ local mt, x function mt:m() diff --git a/test/full/example.lua b/test/full/example.lua index 8633318a..86f89935 100644 --- a/test/full/example.lua +++ b/test/full/example.lua @@ -9,7 +9,7 @@ local noder = require 'core.noder' -- 临时 local function testIfExit(path) - config.config.workspace.preloadFileSize = 1000000000 + config.Lua.workspace.preloadFileSize = 1000000000 local buf = util.loadFile(path:string()) if buf then local vm diff --git a/test/full/init.lua b/test/full/init.lua index 3831a5f1..1f36f3bb 100644 --- a/test/full/init.lua +++ b/test/full/init.lua @@ -11,9 +11,9 @@ function TEST(script) end local function startCollectDiagTimes() - for name in pairs(config.config.diagnostics.neededFileStatus) do + for name in pairs(config.Lua.diagnostics.neededFileStatus) do if name ~= 'no-implicit-any' then - --config.config.diagnostics.neededFileStatus[name] = 'Any' + --config.Lua.diagnostics.neededFileStatus[name] = 'Any' end end DIAGTIMES = {} diff --git a/test/full/projects.lua b/test/full/projects.lua index b2e6d3cc..b9b3187c 100644 --- a/test/full/projects.lua +++ b/test/full/projects.lua @@ -6,8 +6,8 @@ local config = require 'config' local ws = require 'workspace' local fs = require 'bee.filesystem' -config.config.workspace.preloadFileSize = 1000000 -config.config.diagnostics.neededFileStatus = {} +config.Lua.workspace.preloadFileSize = 1000000 +config.Lua.diagnostics.neededFileStatus = {} local function doProjects(pathname) files.removeAll() diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index f2fd8dd7..1d52ecc8 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -748,25 +748,25 @@ TEST 'function' [[ string.gsub():gsub():<?gsub?>() ]] -config.config.hover.enumsLimit = 5 +config.Lua.hover.enumsLimit = 5 TEST 'a|b|c|d|e...(+5)' [[ ---@type 'a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'i'|'j' local <?t?> ]] -config.config.hover.enumsLimit = 1 +config.Lua.hover.enumsLimit = 1 TEST 'a...(+9)' [[ ---@type 'a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'i'|'j' local <?t?> ]] -config.config.hover.enumsLimit = 0 +config.Lua.hover.enumsLimit = 0 TEST '...(+10)' [[ ---@type 'a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'i'|'j' local <?t?> ]] -config.config.hover.enumsLimit = 5 +config.Lua.hover.enumsLimit = 5 TEST 'string|fun():string' [[ ---@type string | fun(): string |