diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-14 17:24:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-14 17:24:10 +0800 |
commit | a70dda951670e48b6fadc1263deccbbc8b948bea (patch) | |
tree | a3d74326dc0e88ed69c68669f395613b83e12853 /test-beta/crossfile | |
parent | 45fb8f5578e6d11d845d0676d97a392ace627cb7 (diff) | |
download | lua-language-server-a70dda951670e48b6fadc1263deccbbc8b948bea.zip |
过测试
Diffstat (limited to 'test-beta/crossfile')
-rw-r--r-- | test-beta/crossfile/references.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test-beta/crossfile/references.lua b/test-beta/crossfile/references.lua index 67097f3a..ffada8f5 100644 --- a/test-beta/crossfile/references.lua +++ b/test-beta/crossfile/references.lua @@ -35,17 +35,15 @@ end local function catch_target(script, sep) local list = {} local cur = 1 - local cut = 0 while true do local start, finish = script:find(('<%%%s.-%%%s>'):format(sep, sep), cur) if not start then break end - list[#list+1] = { start - cut, finish - 4 - cut } + list[#list+1] = { start + 2, finish - 2 } cur = finish + 1 - cut = cut + 4 end - local new_script = script:gsub(('<%%%s(.-)%%%s>'):format(sep, sep), '%1') + local new_script = script:gsub(('<%%%s(.-)%%%s>'):format(sep, sep), ' %1 ') return new_script, list end @@ -163,7 +161,7 @@ TEST { return <~function~> () end ]], - target = {20, 46}, + target = {22, 50}, }, } |