Module:ybi-IPA/testcases
Appearance
- The following documentation is located at Module:ybi-IPA/testcases/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
All tests passed. (refresh)
Text | Expected | Actual | Comments | |
---|---|---|---|---|
लेॽआप्mê (le'āpmê) | [leʔapmɛ] | [leʔapmɛ] |
local tests = require("Module:UnitTests")
local m_IPA = require("Module:ybi-IPA")
local function tag_IPA(IPA)
if phonetic then
IPA = '/' .. IPA .. '/'
else
IPA = '[' .. IPA .. ']'
end
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, "standard")),
tag_IPA(expected),
{ comment = comment }
)
end
function tests:test_phonetic()
examples = {
{ "लेॽआप्mê", "leʔapmɛ" },
}
tests:iterate(examples, "check_output")
end
return tests