summaryrefslogtreecommitdiff
path: root/server/test/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-07 10:39:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-07 10:39:54 +0800
commit3c4b2f65e2d2cd39461211c640246cb04d9f53ad (patch)
tree315afe64a8c708c140b0332af8bf1d277730769a /server/test/vm
parentde63af45054e742806f6f4cc78e2819b12c364e6 (diff)
downloadlua-language-server-3c4b2f65e2d2cd39461211c640246cb04d9f53ad.zip
改成直接覆盖吧
Diffstat (limited to 'server/test/vm')
-rw-r--r--server/test/vm/example.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/test/vm/example.lua b/server/test/vm/example.lua
index 5775465b..459545fd 100644
--- a/server/test/vm/example.lua
+++ b/server/test/vm/example.lua
@@ -3,4 +3,10 @@ local fs = require 'bee.filesystem'
TEST(io.load(ROOT / 'src' / 'core' / 'vm.lua'))
-- 临时
-TEST(io.load(fs.path [[D:\Github\lua\testes\constructs.lua]]))
+local function testIfExit(path)
+ local buf = io.load(fs.path(path))
+ if buf then
+ TEST(buf)
+ end
+end
+testIfExit[[D:\Github\lua\testes\constructs.lua]]