summaryrefslogtreecommitdiff
path: root/test/other
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-20 21:57:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-20 21:57:09 +0800
commit4ca61ec457822dd14966afa0752340ae8ce180a1 (patch)
treeae8adb1ad82c717868e551e699fd3cf3bb290089 /test/other
parentc63b2e404d8d2bb984afe3678a5ba2b2836380cc (diff)
downloadlua-language-server-4ca61ec457822dd14966afa0752340ae8ce180a1.zip
no longer beta
Diffstat (limited to 'test/other')
-rw-r--r--test/other/init.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/other/init.lua b/test/other/init.lua
new file mode 100644
index 00000000..069a2454
--- /dev/null
+++ b/test/other/init.lua
@@ -0,0 +1,11 @@
+local fs = require 'bee.filesystem'
+local platform = require 'bee.platform'
+local path = fs.path '/a/b/c/d/e/../../../..'
+local absolute = fs.absolute(path)
+if platform.OS == 'Windows' then
+ assert(absolute:string():sub(-2) == '/a', absolute:string())
+elseif platform.OS == 'Linux' then
+ assert(absolute:string():sub(-3) == '/a/', absolute:string())
+elseif platform.OS == 'macOS' then
+ -- 不支持
+end