Module:ilo-pron/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:ilo-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 | |
---|---|---|---|
![]() | aldáw | ʔɐlˈdaʊ̯ | ʔɐlˈdaʊ̯ |
![]() | baláy | bɐˈlaɪ̯ | bɐˈlaɪ̯ |
![]() | bituén | biˈtwen | biˈtwen |
![]() | Dios | ˈd͡ʒos | ˈd͡ʒos |
![]() | Estados Unidos | ʔesˌta.dos ʔuˈni.dos | ʔesˌta.dos ʔuˈni.dos |
![]() | estasión | ʔes.tɐˈʃon | ʔes.tɐˈʃon |
![]() | inóm | ʔiˈnom | ʔiˈnom |
tests = require("Module:UnitTests")
local m_ilo_pron = require("Module:ilo-pron")
local m_links = require('Module:links')
local options = { display = tag_IPA }
local ilo = require('Module:languages').getByCode('ilo')
local function ilo_IPA(IPA)
return '<span class="IPA">' .. IPA .. '</span>'
end
local function link(text)
return m_links.full_link{ term = text, lang = ilo }
end
function tests:check_phonetic_ipa(word, expected, respelling)
self:equals(
link(word) ..
(respelling and (" (respelled " .. respelling .. ")") or ""),
m_ilo_pron.IPA(word or respelling, true),
expected,
{ display = tag_IPA }
)
end
function tests:test_phonetic_pron()
local examples = {
{ "aldáw","ʔɐlˈdaʊ̯" },
{ "baláy","bɐˈlaɪ̯" },
{ "bituén","biˈtwen" },
{ "Dios","ˈd͡ʒos" },
{ "Estados Unidos", "ʔesˌta.dos ʔuˈni.dos" },
{ "estasión","ʔes.tɐˈʃon"},
{ "inóm","ʔiˈnom"},
}
self:iterate(examples, "check_phonetic_ipa")
end
return tests