diff options
Diffstat (limited to 'server-beta/test/rename/init.lua')
-rw-r--r-- | server-beta/test/rename/init.lua | 35 |
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) |