summaryrefslogtreecommitdiff
path: root/test/basic
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-04-19 10:22:40 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-04-19 10:22:40 +0800
commit3c6f6a95ed5962bc8fe508ff39a207d542a6cfa1 (patch)
treeea37422475971018908487a7a85a2dd845c5d2f7 /test/basic
parent776d25a2e68b86c2ac37357a71abcd4f2787498b (diff)
downloadlua-language-server-3c6f6a95ed5962bc8fe508ff39a207d542a6cfa1.zip
stash
Diffstat (limited to 'test/basic')
-rw-r--r--test/basic/linker.lua41
1 files changed, 14 insertions, 27 deletions
diff --git a/test/basic/linker.lua b/test/basic/linker.lua
index dd097dfe..d563fa4a 100644
--- a/test/basic/linker.lua
+++ b/test/basic/linker.lua
@@ -48,67 +48,59 @@ CARE['id'] = true
TEST [[
local <?x?>
]] {
- id = 'l:9',
+ id = 'l|9',
}
TEST [[
local x
print(<?x?>)
]] {
- id = '7',
- mode = 'local',
+ id = 'l|7',
}
TEST [[
local x
<?x?> = 1
]] {
- id = '7',
- mode = 'local',
+ id = 'l|7',
}
TEST [[
print(<?X?>)
]] {
- id = '"X"',
- mode = 'global',
+ id = 'g|"X"',
}
TEST [[
print(<?X?>)
]] {
- id = '"X"',
- mode = 'global',
+ id = 'g|"X"',
}
TEST [[
local x
print(x.y.<?z?>)
]] {
- id = '7|"y"|"z"',
- mode = 'local',
+ id = 'l|7|"y"|"z"',
}
TEST [[
local x
function x:<?f?>() end
]] {
- id = '7|"f"',
- mode = 'local',
+ id = 'l|7|"f"',
}
TEST [[
print(X.Y.<?Z?>)
]] {
- id = '"X"|"Y"|"Z"',
- mode = 'global',
+ id = 'g|"X"|"Y"|"Z"',
}
TEST [[
function x:<?f?>() end
]] {
- id = '"x"|"f"',
- mode = 'global',
+ id = 'g|"x"|"f"',
}
TEST [[
@@ -116,16 +108,14 @@ TEST [[
<?x?> = 1,
}
]] {
- id = '1|"x"',
- mode = 'table',
+ id = 'l|1|"x"',
}
CARE['freturn'] = true
TEST [[
return <?X?>
]] {
- id = '"X"',
- mode = 'global',
+ id = 'g|"X"',
freturn = 0,
}
@@ -134,8 +124,7 @@ function f()
return <?X?>
end
]] {
- id = '"X"',
- mode = 'global',
+ id = 'g|"X"',
freturn = 1,
}
@@ -143,14 +132,12 @@ TEST [[
::<?label?>::
goto label
]] {
- id = '5',
- mode = 'local',
+ id = 'l|5',
}
TEST [[
::label::
goto <?label?>
]] {
- id = '3',
- mode = 'local',
+ id = 'l|3',
}