diff options
Diffstat (limited to 'test/references/common.lua')
-rw-r--r-- | test/references/common.lua | 133 |
1 files changed, 39 insertions, 94 deletions
diff --git a/test/references/common.lua b/test/references/common.lua index b46aa81f..74ce391a 100644 --- a/test/references/common.lua +++ b/test/references/common.lua @@ -6,30 +6,30 @@ local <?a?> = 1 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!> @@ -43,20 +43,8 @@ local <?a?> = 1 ]] TEST [[ -local <!a!> -local <?b?> = <!a!> -]] - -TEST [[ local <?a?> -local <!b!> = <!a!> -]] - -TEST [[ -local t = { - <!a!> = 1 -} -print(t.<?a?>) +local b = <!a!> ]] TEST [[ @@ -93,22 +81,9 @@ t[a.b.c] = 1 TEST [[ local t = {} t.x = 1 -t[a.b.<?x?>] = 1 +t[a.b.<!<?x?>!>] = 1 ]] -config.set(nil, 'Lua.IntelliSense.traceBeSetted', true) -TEST [[ -local t -local <!f!> = t.<?f?> - -<!f!>() - -return { - <!f!> = <!f!>, -} -]] -config.set(nil, 'Lua.IntelliSense.traceBeSetted', false) - TEST [[ self = { results = { @@ -124,61 +99,37 @@ print(a.b.<!c!>) ]] TEST [[ -local <!mt!> = {} -function <!mt!>:x() - <?self?>:x() -end -]] - -TEST [[ local mt = {} -function mt:<!x!>() - self:<?x?>() +function mt:x() + <!<?self?>!>:x() end ]] TEST [[ -a.<!b!>.c = 1 -print(a.<?b?>.c) -]] - -config.set(nil, 'Lua.IntelliSense.traceBeSetted', true) -TEST [[ -local <?f?> -local t = { - <!a!> = <!f!> -} -print(t.<!a!>) -]] -config.set(nil, 'Lua.IntelliSense.traceBeSetted', false) - -TEST [[ -local <!f!> -local <!t!> = <?f?> -]] - -config.set(nil, 'Lua.IntelliSense.traceBeSetted', true) -TEST [[ -local <!f!> -a.<!t!> = <?f?> +local <?mt?> = {} +function <!mt!>:x() + self:x() +end ]] TEST [[ -<!t!>.<!f!> = <?t?> +local mt = {} +function mt:x() + self:<!<?x?>!>() +end ]] -config.set(nil, 'Lua.IntelliSense.traceBeSetted', false) TEST [[ -local <!f!> -local <?t?> = <!f!> +local mt = {} +function mt:<?x?>() + self:<!x!>() +end ]] -config.set(nil, 'Lua.IntelliSense.traceBeSetted', true) TEST [[ -local <!t!> -<!t!>.<!f!> = <?t?> +a.<!b!>.c = 1 +print(a.<!<?b?>!>.c) ]] -config.set(nil, 'Lua.IntelliSense.traceBeSetted', false) TEST [[ _G.<?xxx?> = 1 @@ -187,12 +138,6 @@ print(<!xxx!>) ]] TEST [[ ----@class <!Class!> ----@type <?Class?> ----@type <!Class!> -]] - -TEST [[ ---@class <?Class?> ---@type <!Class!> ---@type <!Class!> @@ -202,19 +147,19 @@ TEST [[ ---@class Class local <?t?> ---@type Class -local <!x!> +local x ]] TEST [[ ---@class Class -local <!t!> +local t ---@type Class local <?x?> ]] -- BUG TEST [[ ----@return <?xxx?> +---@return <!<?xxx?>!> function f() end ]] @@ -226,16 +171,16 @@ TEST [[ local <?t?> ]] -TEST [[ ----@class A -local a - ----@type A -local b - ----@type A -local c - -b.<?x?> = 1 -c.<!x!> = 1 -]] +--TEST [[ +-----@class A +--local a +-- +-----@type A +--local b +-- +-----@type A +--local c +-- +--b.<?x?> = 1 +--c.<!x!> = 1 +--]] |