summaryrefslogtreecommitdiff
path: root/server-beta/test/rename
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-11-18 01:15:20 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-11-18 01:15:20 +0800
commit7ade261608ef3649be5c6ee2961e926527e2f03d (patch)
tree4cb3991079061384962de3bf1905c9b5374d65bf /server-beta/test/rename
parente9fcf13480ed98af15201911cad542fe6e84dc1e (diff)
downloadlua-language-server-7ade261608ef3649be5c6ee2961e926527e2f03d.zip
暂存
Diffstat (limited to 'server-beta/test/rename')
-rw-r--r--server-beta/test/rename/init.lua35
1 files changed, 1 insertions, 34 deletions
diff --git a/server-beta/test/rename/init.lua b/server-beta/test/rename/init.lua
index e9fc5aee..8e672e69 100644
--- a/server-beta/test/rename/init.lua
+++ b/server-beta/test/rename/init.lua
@@ -1,39 +1,6 @@
-local core = require 'core.rename'
+local core = require 'core.rename'
local files = require 'files'
-local function catch_target(script)
- local list = {}
- local cur = 1
- while true do
- local start, finish = script:find('<[!?].-[!?]>', cur)
- if not start then
- break
- end
- list[#list+1] = {
- start = start + 2,
- finish = finish - 2,
- }
- cur = finish + 1
- end
- return list
-end
-
-local function founded(targets, results)
- if #targets ~= #results then
- return false
- end
- for _, target in ipairs(targets) do
- for _, result in ipairs(results) do
- if target.start == result.start and target.finish == result.finish then
- goto NEXT
- end
- end
- do return false end
- ::NEXT::
- end
- return true
-end
-
local function replace(text, positions)
local buf = {}
table.sort(positions, function (a, b)