Module error: No such module "pa-IPA/sandbox/testcases".
local tests = require("Module:UnitTests")
local m_IPA = require("Module:pa-IPA/sandbox")
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, "persianized")),
tag_IPA(expected),
{ comment = comment }
)
end
function tests:test_all()
examples = {
{ "ਦੂਜਾ", "d̪uː.d͡ʒɑː", ""},
{ "ਕੁੱਟਣਾ", "kʊʈːə.ɳɑː", "Gemination"},
{ "ਸੁਖ", "sʊ.kʰᵊ", "Final schwa"},
{ "ਖਾਣਾ", "kʰɑː.ɳɑː" },
}
--[[ Copy the following to add more examples:
{ "", "" },
]]
tests:iterate(examples, "check_output")
end
return tests