Jump to content

Module:Escape/testcases: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
Line 3: Line 3:


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

function p.test_string_module()
return p.test_string():gsub('\\', '\\\\')
end
end



Revision as of 18:54, 14 January 2015

-- Example Unit tests for [[Module:Bananas]]. Click talk page to run tests.
local p = require('Module:UnitTests')

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

function p.test_string_module()
 return p.test_string():gsub('\\', '\\\\')
end

return p