From f157d67e4eec2084d706bf5c348c5d10afe2b45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 1 Apr 2019 00:04:45 +0800 Subject: =?UTF-8?q?=E5=88=A0=E6=8E=89=E4=B8=B4=E6=97=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/test/main.lua | 53 ---------------------------------------------------- 1 file changed, 53 deletions(-) (limited to 'server') diff --git a/server/test/main.lua b/server/test/main.lua index 37238e4f..10d5e155 100644 --- a/server/test/main.lua +++ b/server/test/main.lua @@ -16,59 +16,6 @@ ac = {} require 'utility' require 'global_protect' -local function convertLni() - local function scan(path, callback) - if fs.is_directory(path) then - for child in path:list_directory() do - scan(child, callback) - end - else - callback(path) - end - end - - local function callback(path) - local ext = path:extension() - if ext:string() ~= '.lni' then - return - end - local buf = io.load(path) - local lines = {} - local cur = 1 - while true do - local pos = buf:find('[\r\n]', cur) - if pos then - lines[#lines+1] = buf:sub(cur, pos - 1) - if buf:sub(pos, pos + 1) == '\r\n' then - cur = pos + 2 - else - cur = pos + 1 - end - else - lines[#lines+1] = buf:sub(cur) - break - end - end - local last = '' - for i, line in ipairs(lines) do - if line:sub(1, 1) == '[' and line:sub(-1, -1) == ']' then - if line:sub(1, 2) == '[[' and line:sub(-2, -1) == ']]' then - if line == last then - lines[i] = '``````````' - end - end - last = line - end - end - local newBuf = table.concat(lines, '\r\n') - io.save(path, newBuf) - end - - scan(ROOT / 'libs', callback) - scan(ROOT / 'locale', callback) -end ---convertLni() - local function main() local function test(name) local clock = os.clock() -- cgit v1.2.3