Module:Escape/testcases: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
-- Example Unit tests for [[Module:Bananas]]. Click talk page to run tests. |
|||
local p = require('Module:UnitTests') |
local p = require('Module:UnitTests') |
||
Line 6: | Line 5: | ||
end |
end |
||
function p. |
function p.test_string2() |
||
return |
return 'test { test {\\{ test, \\test, \\{,test\\ \\ \\ {\\' |
||
end |
|||
function p.test_string_module(frame) |
|||
return (p['test_string' .. (frame.args[1] or '')]():gsub('\\', '\\\\')) |
|||
end |
end |
||
Revision as of 19:30, 14 January 2015
![]() | This is the test cases page for the module Module:Escape. Results of the test cases. |
local p = require('Module:UnitTests')
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
return p