Content deleted Content added
test using nowiki for display string of assertStringContains, don't truncate the display string as it makes debugging harder |
nowiki the patterns as well, and also nowiki the match in assertNotStringContains |
||
Line 140:
end
if not mw.ustring.find(s, pattern, nil, plain) then
local
if self.frame then
displayString = mw.text.nowiki(s)
else
displayString = s
end
DebugHelper.raise({
ScribuntoUnit = true,
text = mw.ustring.format('Failed to find %s "%s" in string "%s"', plain and "plain string" or "pattern",
message = message
}, 2)
Line 177 ⟶ 179:
if i then
local match = mw.ustring.sub(s, i, j)
local displayMatch, displayPattern
if self.frame then
displayMatch = mw.text.nowiki(match)
displayPattern = mw.text.nowiki(pattern)
else
displayMatch = match
displayPattern = pattern
end
DebugHelper.raise({
ScribuntoUnit = true,
text = mw.ustring.format('Found match "%s" for %s "%s"',
message = message
}, 2)
|