summaryrefslogtreecommitdiff
path: root/test/basic
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-04-16 15:55:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-04-16 15:55:33 +0800
commit776d25a2e68b86c2ac37357a71abcd4f2787498b (patch)
treecbd11fbb1a3eb551fa3ed4b3d9f38edec7487ce2 /test/basic
parenta656626742e3a475731a4d27e0a7f9292ecbaa22 (diff)
downloadlua-language-server-776d25a2e68b86c2ac37357a71abcd4f2787498b.zip
stash
Diffstat (limited to 'test/basic')
-rw-r--r--test/basic/linker.lua50
1 files changed, 23 insertions, 27 deletions
diff --git a/test/basic/linker.lua b/test/basic/linker.lua
index 3b18ddc9..dd097dfe 100644
--- a/test/basic/linker.lua
+++ b/test/basic/linker.lua
@@ -45,83 +45,79 @@ local function TEST(script)
end
CARE['id'] = true
-CARE['loc'] = true
TEST [[
local <?x?>
]] {
- id = '9',
- loc = true,
+ id = 'l:9',
}
TEST [[
local x
print(<?x?>)
]] {
- id = '7',
- loc = true,
+ id = '7',
+ mode = 'local',
}
TEST [[
local x
<?x?> = 1
]] {
- id = '7',
- loc = true,
+ id = '7',
+ mode = 'local',
}
-CARE['global'] = true
TEST [[
print(<?X?>)
]] {
- id = '"X"',
- global = true,
+ id = '"X"',
+ mode = 'global',
}
TEST [[
print(<?X?>)
]] {
- id = '"X"',
- global = true,
+ id = '"X"',
+ mode = 'global',
}
TEST [[
local x
print(x.y.<?z?>)
]] {
- id = '7|"y"|"z"',
- loc = true,
+ id = '7|"y"|"z"',
+ mode = 'local',
}
TEST [[
local x
function x:<?f?>() end
]] {
- id = '7|"f"',
- loc = true,
+ id = '7|"f"',
+ mode = 'local',
}
TEST [[
print(X.Y.<?Z?>)
]] {
- id = '"X"|"Y"|"Z"',
- global = true,
+ id = '"X"|"Y"|"Z"',
+ mode = 'global',
}
TEST [[
function x:<?f?>() end
]] {
- id = '"x"|"f"',
- global = true,
+ id = '"x"|"f"',
+ mode = 'global',
}
-CARE['tfield'] = true
TEST [[
{
<?x?> = 1,
}
]] {
- id = '1|"x"',
- tfield = true,
+ id = '1|"x"',
+ mode = 'table',
}
CARE['freturn'] = true
@@ -129,7 +125,7 @@ TEST [[
return <?X?>
]] {
id = '"X"',
- global = true,
+ mode = 'global',
freturn = 0,
}
@@ -139,7 +135,7 @@ function f()
end
]] {
id = '"X"',
- global = true,
+ mode = 'global',
freturn = 1,
}
@@ -148,7 +144,7 @@ TEST [[
goto label
]] {
id = '5',
- loc = true,
+ mode = 'local',
}
TEST [[
@@ -156,5 +152,5 @@ TEST [[
goto <?label?>
]] {
id = '3',
- loc = true,
+ mode = 'local',
}