summaryrefslogtreecommitdiff
path: root/server/test/crossfile
diff options
context:
space:
mode:
Diffstat (limited to 'server/test/crossfile')
-rw-r--r--server/test/crossfile/completion.lua58
1 files changed, 58 insertions, 0 deletions
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua
index a55ff743..d150609e 100644
--- a/server/test/crossfile/completion.lua
+++ b/server/test/crossfile/completion.lua
@@ -126,6 +126,8 @@ function TEST(data)
end
end
+require 'bee.platform'.OS = 'Windows'
+
TEST {
{
path = 'abc.lua',
@@ -356,6 +358,62 @@ TEST {
TEST {
{
+ path = 'abc.lua',
+ content = '',
+ },
+ {
+ path = 'ABCD.lua',
+ content = '',
+ },
+ {
+ path = 'test.lua',
+ content = 'require "a@"',
+ main = true,
+ },
+ completion = {
+ {
+ label = 'ABCD',
+ kind = CompletionItemKind.Reference,
+ documentation = 'ABCD.lua',
+ textEdit = EXISTS,
+ },
+ {
+ label = 'abc',
+ kind = CompletionItemKind.Reference,
+ documentation = 'abc.lua',
+ textEdit = EXISTS,
+ },
+ }
+}
+
+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',
content = [[
return {