diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-20 15:23:15 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-20 15:23:15 +0800 |
commit | 0f3ebc73bbec142b69ae5fd05c028b249dc4a0e7 (patch) | |
tree | 0af8d4d66a45d24fae04ff2198c7cdbc4fbe0e34 | |
parent | aa80daf9c9349bf8a4a3b6d6d957f3e423c60720 (diff) | |
download | lua-language-server-0f3ebc73bbec142b69ae5fd05c028b249dc4a0e7.zip |
#7 测试时区分平台
-rw-r--r-- | server/test/crossfile/completion.lua | 56 | ||||
-rw-r--r-- | server/test/crossfile/definition.lua | 2 |
2 files changed, 31 insertions, 27 deletions
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua index 6fbc0541..ee57963f 100644 --- a/server/test/crossfile/completion.lua +++ b/server/test/crossfile/completion.lua @@ -100,7 +100,7 @@ function TEST(data) end end -require 'bee.platform'.OS = 'Windows' +if require'bee.platform'.OS == 'Windows' then TEST { { @@ -162,6 +162,34 @@ TEST { } } +else + +TEST { + { + path = 'abc.lua', + content = '', + }, + { + path = 'ABCD.lua', + content = '', + }, + { + path = 'test.lua', + content = 'require "a$"', + main = true, + }, + completion = { + { + label = 'abc', + kind = CompletionItemKind.Reference, + documentation = 'abc.lua', + textEdit = EXISTS, + }, + } +} + +end + TEST { { path = 'abc.lua', @@ -360,32 +388,6 @@ TEST { } } -require 'bee.platform'.OS = 'Macos' - -TEST { - { - path = 'abc.lua', - content = '', - }, - { - path = 'ABCD.lua', - content = '', - }, - { - path = 'test.lua', - content = 'require "a$"', - main = true, - }, - completion = { - { - label = 'abc', - kind = CompletionItemKind.Reference, - documentation = 'abc.lua', - textEdit = EXISTS, - }, - } -} - TEST { { path = 'a.lua', diff --git a/server/test/crossfile/definition.lua b/server/test/crossfile/definition.lua index 73752ae6..c765d98a 100644 --- a/server/test/crossfile/definition.lua +++ b/server/test/crossfile/definition.lua @@ -122,6 +122,7 @@ TEST { }, } +if require 'bee.platform'.OS == 'Windows' then TEST { { path = 'a.lua', @@ -133,6 +134,7 @@ TEST { content = 'require <?"A"?>', }, } +end TEST { { |