Content deleted Content added
Create sandbox version of Module:ScribuntoUnit with an assertContains method |
fix parameter name error |
||
Line 124:
-- @param plain search is made with a plain string instead of a ustring pattern
--
function ScribuntoUnit:assertContains(pattern,
if type(pattern) ~= 'string' then
DebugHelper.raise({
Line 132:
}, 2)
end
if type(
DebugHelper.raise({
ScribuntoUnit = true,
text = mw.ustring.format("String type error (expected string, got %s)", type(
message = message
}, 2)
end
if not mw.ustring.find(
local
if #
end
DebugHelper.raise({
ScribuntoUnit = true,
text = mw.ustring.format('Failed to find %s "%s" in string "%s"', plain and "plain string" or "pattern", pattern,
message = message
}, 2)
|