summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-03-28 22:08:04 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-03-28 22:08:04 +0800
commitd79bad83b120ab4a04bed447fad62789f21f24b5 (patch)
tree038f0c6476287a646a7f4d30fff3a82763d50bf7 /test
parent40cce47bf1f7bfd4d8945a0a189367f9dbb12f2d (diff)
downloadlua-language-server-d79bad83b120ab4a04bed447fad62789f21f24b5.zip
update
Diffstat (limited to 'test')
-rw-r--r--test/references/common.lua30
-rw-r--r--test/references/init.lua4
2 files changed, 11 insertions, 23 deletions
diff --git a/test/references/common.lua b/test/references/common.lua
index b46aa81f..e95a4031 100644
--- a/test/references/common.lua
+++ b/test/references/common.lua
@@ -1,35 +1,35 @@
local config = require "config"
TEST [[
-local <?a?> = 1
+local <!<?a?>!> = 1
<!a!> = <!a!>
]]
TEST [[
<?a?> = 1
-<!a!> = <!a!>
+a = <!a!>
]]
TEST [[
local t
t.<?a?> = 1
-t.<!a!> = t.<!a!>
+t.a = t.<!a!>
]]
TEST [[
t.<?a?> = 1
-t.<!a!> = t.<!a!>
+t.a = t.<!a!>
]]
TEST [[
:: <!LABEL!> ::
-goto <?LABEL?>
+goto <!<?LABEL?>!>
if true then
goto <!LABEL!>
end
]]
TEST [[
-:: <?LABEL?> ::
+:: <!<?LABEL?>!> ::
goto <!LABEL!>
if true then
goto <!LABEL!>
@@ -38,25 +38,13 @@ end
TEST [[
local a = 1
-local <?a?> = 1
+local <!<?a?>!> = 1
<!a!> = <!a!>
]]
TEST [[
-local <!a!>
-local <?b?> = <!a!>
-]]
-
-TEST [[
-local <?a?>
-local <!b!> = <!a!>
-]]
-
-TEST [[
-local t = {
- <!a!> = 1
-}
-print(t.<?a?>)
+local <!<?a?>!>
+local b = <!a!>
]]
TEST [[
diff --git a/test/references/init.lua b/test/references/init.lua
index 81dfb481..ed324d36 100644
--- a/test/references/init.lua
+++ b/test/references/init.lua
@@ -22,8 +22,8 @@ function TEST(script)
local newScript, catched = catch(script, '!?~')
files.setText('', newScript)
- local input = catched['?'] + catched['~']
- local expect = catched['!'] + catched['?']
+ local input = catched['?']
+ local expect = catched['!']
local results = core('', input[1][1])
if results then
local positions = {}