summaryrefslogtreecommitdiff
path: root/test/crossfile
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-25 21:38:57 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-25 21:38:57 +0800
commit5ec8ad22d27051507c55d49d6144f08132976215 (patch)
tree75c843f738c0283eb19516293f857d29560d9b3c /test/crossfile
parent24f4dfa889cc66bd05223e5d8d36fa19865c772b (diff)
downloadlua-language-server-5ec8ad22d27051507c55d49d6144f08132976215.zip
cleanup
Diffstat (limited to 'test/crossfile')
-rw-r--r--test/crossfile/allreferences.lua5
-rw-r--r--test/crossfile/completion.lua24
-rw-r--r--test/crossfile/definition.lua16
-rw-r--r--test/crossfile/diagnostic.lua4
4 files changed, 24 insertions, 25 deletions
diff --git a/test/crossfile/allreferences.lua b/test/crossfile/allreferences.lua
index 6c7febeb..2753d785 100644
--- a/test/crossfile/allreferences.lua
+++ b/test/crossfile/allreferences.lua
@@ -68,7 +68,7 @@ TEST {
},
}
-config.set('Lua.IntelliSense.traceBeSetted', true)
+config.set(nil, 'Lua.IntelliSense.traceBeSetted', true)
TEST {
{
path = 'a.lua',
@@ -215,5 +215,4 @@ TEST {
]]
},
}
-config.set('Lua.IntelliSense.traceBeSetted', false)
-
+config.set(nil, 'Lua.IntelliSense.traceBeSetted', false)
diff --git a/test/crossfile/completion.lua b/test/crossfile/completion.lua
index 50ebad45..c608ccab 100644
--- a/test/crossfile/completion.lua
+++ b/test/crossfile/completion.lua
@@ -307,8 +307,8 @@ TEST {
}
}
-local originSeparator = config.get 'Lua.completion.requireSeparator'
-config.set('Lua.completion.requireSeparator', '/')
+local originSeparator = config.get(nil, 'Lua.completion.requireSeparator')
+config.set(nil, 'Lua.completion.requireSeparator', '/')
TEST {
{
path = 'abc.lua',
@@ -331,7 +331,7 @@ TEST {
},
}
}
-config.set('Lua.completion.requireSeparator', originSeparator)
+config.set(nil, 'Lua.completion.requireSeparator', originSeparator)
TEST {
{
@@ -390,8 +390,8 @@ TEST {
}
-local originRuntimePath = config.get 'Lua.runtime.path'
-config.set('Lua.runtime.path', {
+local originRuntimePath = config.get(nil, 'Lua.runtime.path')
+config.set(nil, 'Lua.runtime.path', {
'?/1.lua',
})
@@ -419,10 +419,10 @@ TEST {
}
}
-config.set('Lua.runtime.path', originRuntimePath)
+config.set(nil, 'Lua.runtime.path', originRuntimePath)
-local originRuntimePath = config.get 'Lua.runtime.path'
-config.set('Lua.runtime.path', {
+local originRuntimePath = config.get(nil, 'Lua.runtime.path')
+config.set(nil, 'Lua.runtime.path', {
'D:/?/1.lua',
})
@@ -445,7 +445,7 @@ TEST {
}
}
-config.set('Lua.runtime.path', originRuntimePath)
+config.set(nil, 'Lua.runtime.path', originRuntimePath)
TEST {
{
@@ -627,7 +627,7 @@ TEST {
}
}
-config.set('Lua.runtime.pathStrict', true)
+config.set(nil, 'Lua.runtime.pathStrict', true)
TEST {
{ path = 'f/a.lua' },
@@ -672,7 +672,7 @@ TEST {
}
}
-config.set('Lua.runtime.pathStrict', false)
+config.set(nil, 'Lua.runtime.pathStrict', false)
TEST {
{
@@ -960,7 +960,7 @@ TEST {
completion = EXISTS
}
-config.prop('Lua.runtime.special', 'import', 'require')
+config.prop(nil, 'Lua.runtime.special', 'import', 'require')
TEST {
{ path = 'abcde.lua', content = '' },
{
diff --git a/test/crossfile/definition.lua b/test/crossfile/definition.lua
index 058f5d18..8f4dd7e8 100644
--- a/test/crossfile/definition.lua
+++ b/test/crossfile/definition.lua
@@ -117,7 +117,7 @@ TEST {
},
}
-config.set('Lua.runtime.pathStrict', true)
+config.set(nil, 'Lua.runtime.pathStrict', true)
TEST {
{
path = 'aaa/bbb.lua',
@@ -140,7 +140,7 @@ TEST {
},
}
-config.set('Lua.runtime.pathStrict', false)
+config.set(nil, 'Lua.runtime.pathStrict', false)
TEST {
{
@@ -740,8 +740,8 @@ TEST {
}
platform.OS = originOS
-local originRuntimePath = config.get 'Lua.runtime.path'
-config.set('Lua.runtime.path', {
+local originRuntimePath = config.get(nil, 'Lua.runtime.path')
+config.set(nil, 'Lua.runtime.path', {
'?/1.lua',
})
TEST {
@@ -760,7 +760,7 @@ TEST {
},
}
-config.set('Lua.runtime.path', {
+config.set(nil, 'Lua.runtime.path', {
'D:/?/1.lua',
})
TEST {
@@ -778,7 +778,7 @@ TEST {
]],
},
}
-config.set('Lua.runtime.path', originRuntimePath)
+config.set(nil, 'Lua.runtime.path', originRuntimePath)
TEST {
{
@@ -795,7 +795,7 @@ TEST {
},
}
-config.set('Lua.IntelliSense.traceFieldInject', true)
+config.set(nil, 'Lua.IntelliSense.traceFieldInject', true)
TEST {
{
path = 'a.lua',
@@ -816,7 +816,7 @@ print(b.<?test?>)
]]
}
}
-config.set('Lua.IntelliSense.traceFieldInject', false)
+config.set(nil, 'Lua.IntelliSense.traceFieldInject', false)
TEST {
{
diff --git a/test/crossfile/diagnostic.lua b/test/crossfile/diagnostic.lua
index c2d043f4..9bdce197 100644
--- a/test/crossfile/diagnostic.lua
+++ b/test/crossfile/diagnostic.lua
@@ -5,8 +5,8 @@ local config = require 'config'
local platform = require 'bee.platform'
local catch = require 'catch'
-config.get 'Lua.diagnostics.neededFileStatus'['deprecated'] = 'Any'
-config.get 'Lua.diagnostics.neededFileStatus'['type-check'] = 'Any'
+config.get(nil, 'Lua.diagnostics.neededFileStatus')['deprecated'] = 'Any'
+config.get(nil, 'Lua.diagnostics.neededFileStatus')['type-check'] = 'Any'
rawset(_G, 'TEST', true)