summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-03-03 11:09:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-03-03 11:09:52 +0800
commita4aa3dc17e2f738f39aa429c80fe15f8af81b5c4 (patch)
treec3657f9d39c62e0c887809757260d7c09388e97d /test
parentb9e9b9e32f7f7d34dfaa1707f073d0b5fa456fcc (diff)
downloadlua-language-server-a4aa3dc17e2f738f39aa429c80fe15f8af81b5c4.zip
#436 cannot ignore case in non-Windows platforms
Diffstat (limited to 'test')
-rw-r--r--test/crossfile/definition.lua65
1 files changed, 61 insertions, 4 deletions
diff --git a/test/crossfile/definition.lua b/test/crossfile/definition.lua
index 0eb6888f..9ee90de2 100644
--- a/test/crossfile/definition.lua
+++ b/test/crossfile/definition.lua
@@ -1,7 +1,8 @@
-local files = require 'files'
-local furi = require 'file-uri'
-local core = require 'core.definition'
-local config = require 'config'
+local files = require 'files'
+local furi = require 'file-uri'
+local core = require 'core.definition'
+local config = require 'config'
+local platform = require 'bee.platform'
rawset(_G, 'TEST', true)
@@ -662,3 +663,59 @@ TEST {
]]
}
}
+
+local originOS = platform.OS
+platform.OS = 'Linux'
+
+TEST {
+ {
+ path = 'test.lua',
+ content = [[
+ return {
+ <!x!> = 1,
+ }
+ ]],
+ },
+ {
+ path = 'Test.lua',
+ content = [[
+ return {
+ x = 1,
+ }
+ ]],
+ },
+ {
+ path = 'b.lua',
+ content = [[
+ local t = require 'test'
+ print(t.<?x?>)
+ ]]
+ }
+}
+
+TEST {
+ {
+ path = 'test.lua',
+ content = [[
+ return {
+ x = 1,
+ }
+ ]],
+ },
+ {
+ path = 'Test.lua',
+ content = [[
+ return {
+ <!x!> = 1,
+ }
+ ]],
+ },
+ {
+ path = 'b.lua',
+ content = [[
+ local t = require 'Test'
+ print(t.<?x?>)
+ ]]
+ }
+}
+platform.OS = originOS