diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-11-30 15:23:18 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-11-30 15:23:18 +0800 |
commit | 71a267d42d6a28dcf1333092d57714f274fc698d (patch) | |
tree | 29f4d0dff2d052d3c94c5b6bf7cf42de4bbcc646 /server/test/definition/init.lua | |
parent | 24243540681b97956ef29a6bec9d94a6f1dc5208 (diff) | |
download | lua-language-server-71a267d42d6a28dcf1333092d57714f274fc698d.zip |
支持向后引用
Diffstat (limited to 'server/test/definition/init.lua')
-rw-r--r-- | server/test/definition/init.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/test/definition/init.lua b/server/test/definition/init.lua index de503c81..c13f1fb1 100644 --- a/server/test/definition/init.lua +++ b/server/test/definition/init.lua @@ -47,8 +47,12 @@ function TEST(script) assert(ast) local suc, result = matcher.definition(ast, pos) - assert(suc) - assert(founded(target, result)) + if suc then + assert(suc) + assert(founded(target, result)) + else + assert(#target == 0) + end end require 'definition.set' |