Module:bho-IPA/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:bho-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
3 of 8 tests failed. (refresh)
Text | Expected | Actual | Comments | |
---|---|---|---|---|
![]() | रवि (ravi) | [ɾəʋi] | [ɾəʋi] | |
![]() | हऽ (haː) | [ɦəː] | [ɦəː] | |
![]() | देखऽलऽ (dēkhaːlaː) | [d̪ekʰəːləː] | [d̪eːkʰəːləː] | |
![]() | देखले (dēkhᵊlē) | [d̪ekʰᵊleː] | [d̪eːkʰᵊleː] | |
![]() | पानिया (pāniyā) | [pənɪjaː] | [pənɪjaː] | |
![]() | देकले (dēkᵊlē) | [d̪ekᵊleː] | [d̪ekᵊleː] | |
![]() | देख꣱ल꣱ (dēkhaːlaː) | [d̪ekʰəːləː] | [d̪eːkʰəːləː] | |
![]() | लईकी (laīkī) | [ləiːkiː] | [ləiːkiː] |
local tests = require("Module:UnitTests")
local m_IPA = require("Module:bho-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 = {
{ "रवि", "ɾəʋi" },
{ "हऽ", "ɦəː" },
{ "देखऽलऽ", "d̪ekʰəːləː" },
{ "देखले", "d̪ekʰᵊleː" },
{ "पानिया", "pənɪjaː" },
{ "देकले", "d̪ekᵊleː" },
{ "देख꣱ल꣱", "d̪ekʰəːləː" },
{ "लईकी", "ləiːkiː" },
}
tests:iterate(examples, "check_output")
end
return tests