Module:pa-IPA/sandbox/testcases
Appearance
- The following documentation is located at Module:pa-IPA/sandbox/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 of
4 of 4 tests failed. (refresh)
Text | Expected | Actual | Comments | |
---|---|---|---|---|
ਦੂਜਾ (dūjā) | d̪uː.d͡ʒɑː | dū.jā | ||
ਕੁੱਟਣਾ (kuṭṭaṇā) | kʊʈːə.ɳɑː | kuṭ.ṭa.ṇā | Gemination | |
ਸੁਖ (sukh) | sʊ.kʰᵊ | sukʰ | Final schwa | |
ਖਾਣਾ (khāṇā) | kʰɑː.ɳɑː | kʰā.ṇā |
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