diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/crossfile/hover.lua | 6 | ||||
-rw-r--r-- | test/hover/init.lua | 8 | ||||
-rw-r--r-- | test/type_inference/init.lua | 18 |
3 files changed, 16 insertions, 16 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index b0b66253..09eceb43 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -976,16 +976,16 @@ end }, hover = [[ ```lua -function f(p: "a"|"b") +function f(p: 'a'|'b') ``` --- ```lua p: - | "a" -- comment 1 + | 'a' -- comment 1 -- comment 2 - | "b" -- comment 3 + | 'b' -- comment 3 -- comment 4 ```]]} diff --git a/test/hover/init.lua b/test/hover/init.lua index f347cd99..ee66ef2b 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -1397,7 +1397,7 @@ TEST [[ local <?t?> ]] [[ -local t: string|"enum1"|"enum2" +local t: string|'enum1'|'enum2' ]] TEST [[ @@ -1406,7 +1406,7 @@ TEST [[ ---@type <?A?> ]] [[ -(alias) A 展开为 string|"enum1"|"enum2" +(alias) A 展开为 string|'enum1'|'enum2' ]] TEST [[ @@ -1416,7 +1416,7 @@ TEST [[ local <?t?> ]] [[ -local t: string|"enum1"|"enum2" +local t: string|'enum1'|'enum2' ]] TEST [[ @@ -1426,7 +1426,7 @@ TEST [[ local <?t?> ]] [[ -local t: string|"enum1"|"enum2" +local t: string|'enum1'|'enum2' ]] TEST [[ diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index df45dd9d..9ead2861 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -418,13 +418,13 @@ TEST 'string|table' [[ local <?x?> ]] -TEST '"enum1"|"enum2"' [[ +TEST [['enum1'|'enum2']] [[ ---@type 'enum1' | 'enum2' local <?x?> ]] -TEST '"enum1"|"enum2"' [[ ----@type 'enum1' | 'enum2' +TEST [["enum1"|"enum2"]] [[ +---@type "enum1" | "enum2" local <?x?> ]] @@ -450,21 +450,21 @@ TEST 'A' [[ local <?x?> ]] config.set(nil, 'Lua.hover.expandAlias', true) -TEST '"enum1"|"enum2"' [[ +TEST [['enum1'|'enum2']] [[ ---@alias A 'enum1' | 'enum2' ---@type A local <?x?> ]] -TEST '"enum1"|"enum2"' [[ +TEST [['enum1'|'enum2']] [[ ---@alias A 'enum1' | 'enum2' | A ---@type A local <?x?> ]] -TEST '"enum1"|"enum2"|B' [[ +TEST [['enum1'|'enum2'|B]] [[ ---@alias A 'enum1' | 'enum2' | B ---@type A @@ -544,7 +544,7 @@ local t = {} print(t.<?a?>) ]] -TEST '"aaa"|"bbb"' [[ +TEST [['aaa'|'bbb']] [[ ---@type table<string, 'aaa'|'bbb'> local t = {} @@ -992,13 +992,13 @@ string.gsub():gsub():<?gsub?>() ]] config.set(nil, 'Lua.hover.enumsLimit', 5) -TEST '"a"|"b"|"c"|"d"|"e"...(+5)' [[ +TEST [['a'|'b'|'c'|'d'|'e'...(+5)]] [[ ---@type 'a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'i'|'j' local <?t?> ]] config.set(nil, 'Lua.hover.enumsLimit', 1) -TEST '"a"...(+9)' [[ +TEST [['a'...(+9)]] [[ ---@type 'a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'i'|'j' local <?t?> ]] |