Module:pam-pron/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:pam-pron/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 | |
---|---|---|---|
![]() | aldo | əlˈdoː | əlˈdoː |
![]() | amanu | əˈmäː.nu | əˈmäː.nu |
![]() | bale | bəˈlɛː | bəˈlɛː |
![]() | baka | ˈbäː.xə | ˈbäː.xə |
![]() | batuin | bəˈtwin | bəˈtwin |
![]() | kamaru | ˈkäː.mə.ɾu | ˈkäː.mə.ɾu |
![]() | deni | ˈdɛː.ni | ˈdɛː.ni |
![]() | Wawa | ˈwäː.wəʔ | ˈwäː.wəʔ |
local tests = require("Module:UnitTests")
local m_pam_pron = require("Module:pam-pron")
local function pag_IPA(IPA)
return "<span class='IPA'>" .. IPA .. "</span>"
end
function tests:check_phonetic_ipa(word, expected, respelling)
self:equals(
"[[" .. word .. "#Kapampangan|" .. word .. "]]",
m_pam_pron.IPA(respelling, true),
expected,
{ display = tag_IPA }
)
end
function tests:test_phonetic_pron()
local examples = {
{ "aldo","əlˈdoː","aldó" },
{ "amanu","əˈmäː.nu","amánu" },
{ "bale","bəˈlɛː", "balé" },
{ "baka","ˈbäː.xə","báka" },
{ "batuin","bəˈtwin", "batuin" },
{ "kamaru","ˈkäː.mə.ɾu", "kámaru" },
{ "deni","ˈdɛː.ni", "déni" },
{ "Wawa", "ˈwäː.wəʔ", "Wáwâ"}
}
self:iterate(examples, "check_phonetic_ipa")
end
return tests