summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-08-28 20:29:22 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-08-28 20:29:22 +0800
commit1e878722b14c0a2448a494ea8ad475ddefeda659 (patch)
tree2a9616bc66b7d708a2cdaa15ac20512c0c8d0e35 /server
parentdde373ef456556d04b3a542c2c254e0aa3d289eb (diff)
downloadlua-language-server-1e878722b14c0a2448a494ea8ad475ddefeda659.zip
换个写法试试
Diffstat (limited to 'server')
-rw-r--r--server/test.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/test.lua b/server/test.lua
index a944c8f0..05f1fcfd 100644
--- a/server/test.lua
+++ b/server/test.lua
@@ -10,11 +10,11 @@ package.path = rootPath .. 'src/?.lua'
local fs = require 'bee.filesystem'
local subprocess = require 'bee.subprocess'
+local platform = require 'bee.platform'
ROOT = fs.absolute(fs.path(rootPath))
local function runTest(root)
- local is_macos = package.cpath:sub(-3) == '.so'
- local ext = is_macos and '' or '.exe'
+ local ext = platform.OS == 'Windows' and '.exe' or ''
local exe = root / 'bin' / 'lua-language-server' .. ext
local test = root / 'test' / 'main.lua'
local lua = subprocess.spawn {