local p = require('Module:UnitTests')
local function clean(input) local orig = input local result = input:gsub("(?)(.-)(?)", "%1%2%3") result = mw.text.decode(result) if orig ~= result then mw.log(orig, result, "\n") end return resultend
function p:test_italicizeTaxonName local examples = local italicizeTaxonName = require "Module:TaxonItalics".italicizeTaxonName self:iterate(examples, function (self, input, expected) output = clean(italicizeTaxonName(input)) --if output ~= expected then mw.log(expected, output) end -- self:equals(input, output, expected) end)end
p["testcases for <code>italicizeTaxonName</code>"] = p.test_italicizeTaxonNamep.test_italicizeTaxonName = nil
return p