This is a private module sandbox of Sinonquoi, for their own experimentation. Items in this module may be added and removed at Sinonquoi's discretion; do not rely on this module's stability.
local tests = require("Module:UnitTests")
local m_IPA = require("Module:hi-IPA")
local function tag_IPA(IPA)
return '<span class="IPA">' .. IPA .. '</span>'
end
function tests:check_output(term, expected, comment)
self:equals(
m_IPA.link(term),
tag_IPA(m_IPA.toIPA(term)),
tag_IPA(expected),
{ comment = comment }
)
end
function tests:test_all()
examples = {
{ "கக்", "kak", "" },
{ "ஒன்று", "ondru", "" },
}
tests:iterate(examples, "check_output")
end
return tests