Toggle menu
15
236
85
27.9K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Escape/testcases: Difference between revisions

From Kenshi Wiki
Prd (talk | contribs)
Created page with "p = {} function p.test_string() return 'test, \\test, \\{,test\\\\ \\\\ \\\\\\\\' end function p.test_string2() return 'test { test {\\{ test, \\test, \\{,test\\ \\ \\ {\\' end function p.test_string_module(frame) return (p['test_string' .. (frame.args[1] or '')]():gsub('\\', '\\\\')) end function p.test_kill500(frame) local esc = require('Module:Escape') for k = 1, 500 do local v = esc:kill(p.test_string2(), 'test') end return os.clock(esc) end return p"
 
(No difference)

Latest revision as of 04:50, 15 February 2025

Testcases which activate Module:Escape



p = {}

function p.test_string()
 return 'test, \\test, \\{,test\\\\ \\\\ \\\\\\\\'
end

function p.test_string2()
 return 'test { test {\\{ test, \\test, \\{,test\\ \\ \\ {\\'
end

function p.test_string_module(frame)
 return (p['test_string' .. (frame.args[1] or '')]():gsub('\\', '\\\\'))
end

function p.test_kill500(frame)
 local esc = require('Module:Escape')
 for k = 1, 500 do
  local v = esc:kill(p.test_string2(), 'test')
 end
 return os.clock(esc)
end

return p