diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-01-30 12:01:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-01-30 12:01:34 +0800 |
commit | f5d631b87b38a54b8cb40dec602a7f1910fe7e4f (patch) | |
tree | db2c1715e43ec4cf7c466578c44c3c6fdb9b2a67 /test | |
parent | de82efa9bf794ea195c4d1b3da229500c8a213e1 (diff) | |
download | lua-language-server-f5d631b87b38a54b8cb40dec602a7f1910fe7e4f.zip |
respect quotation marks
Diffstat (limited to 'test')
-rw-r--r-- | test/completion/common.lua | 18 | ||||
-rw-r--r-- | test/hover/init.lua | 38 |
2 files changed, 28 insertions, 28 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua index e0668ea3..8d23822a 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -1006,12 +1006,12 @@ t.<??> ]] { { - label = 'a.b.c', + label = "'a.b.c'", kind = define.CompletionItemKind.Field, textEdit = { start = 40002, finish = 40002, - newText = '["a.b.c"]', + newText = "['a.b.c']", }, additionalTextEdits = { { @@ -1032,12 +1032,12 @@ t. <??> ]] { { - label = 'a.b.c', + label = "'a.b.c'", kind = define.CompletionItemKind.Field, textEdit = { start = 40005, finish = 40005, - newText = '["a.b.c"]', + newText = "['a.b.c']", }, additionalTextEdits = { { @@ -1058,7 +1058,7 @@ t['<??>'] ]] { { - label = 'a.b.c', + label = "'a.b.c'", kind = define.CompletionItemKind.Field, textEdit = { start = 40003, @@ -1075,12 +1075,12 @@ z<??> ]] { { - label = 'z.b.c', + label = "'z.b.c'", kind = define.CompletionItemKind.Field, textEdit = { start = 20000, finish = 20001, - newText = '_ENV["z.b.c"]', + newText = "_ENV['z.b.c']", }, }, } @@ -1094,12 +1094,12 @@ z<??> ]] { { - label = 'z.b.c', + label = "'z.b.c'", kind = define.CompletionItemKind.Field, textEdit = { start = 20000, finish = 20001, - newText = '_G["z.b.c"]', + newText = "_G['z.b.c']", }, }, } diff --git a/test/hover/init.lua b/test/hover/init.lua index 751299bb..a3741764 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -490,7 +490,7 @@ local self: { id: integer = 1, remove: function, __index: table, - __name: string = "obj", + __name: string = 'obj', } ]] @@ -610,7 +610,7 @@ end local <?r?> = a(1) ]] [[ -local r: string = "a" +local r: string = 'a' ]] TEST[[ @@ -620,7 +620,7 @@ end local _, <?r?> = pcall(a, 1) ]] [[ -local r: string = "a" +local r: string = 'a' ]] TEST[[ @@ -633,7 +633,7 @@ local n: integer TEST[[ local <?x?> = '\a' ]] -[[local x: string = "\007"]] +[[local x: string = '\007']] TEST [[ local <?t?> = { @@ -827,9 +827,9 @@ local <?t?> = { ]] [[ local t: { - [1]: string = "aaa", - [2]: string = "bbb", - [3]: string = "ccc", + [1]: string = 'aaa', + [2]: string = 'bbb', + [3]: string = 'ccc', } ]] @@ -1712,13 +1712,13 @@ local <?t?> = { ]] [[ local t: { - x: string = "e", - y: string = "f", - ['z']: string = "g", - [10]: string = "d", - [1]: string = "a", - [2]: string = "b", - [3]: string = "c"|"h", + x: string = 'e', + y: string = 'f', + ['z']: string = 'g', + [10]: string = 'd', + [1]: string = 'a', + [2]: string = 'b', + [3]: string = 'c'|'h', } ]] @@ -1830,7 +1830,7 @@ local t = { local <?x?> = t[#t] ]] [[ -local x: string = "x" +local x: string = 'x' ]] TEST [[ @@ -1864,10 +1864,10 @@ local <?x?> = { ]] [[ local x: { - x: string = "", - y: string = "", - _x: string = "", - _y: string = "", + x: string = '', + y: string = '', + _x: string = '', + _y: string = '', } ]] |