Module:cbk-pronunc/testcases
Appearance
- The following documentation is located at Module:cbk-pronunc/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
1 of 23 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
accidente | aɡ.siˈd̪ẽn̪.t̪e | aɡ.siˈd̪ẽn̪.t̪e | |
banco | ˈbãŋ.ko | ˈbãŋ.ko | |
batà | ˈba.t̪aʔ | ˈba.t̪aʔ | |
casa | ˈka.sa | ˈka.sa | |
Chavacano | t͡ʃa.baˈka.no | t͡ʃa.baˈka.no | |
colegio | koˈle.xjo | koˈle.xjo | |
Dios | ˈd͡ʒos | ˈd͡ʒos | |
dulce | ˈd̪ul.se | ˈd̪ul.se | |
estrellas | es̪ˈt̪ɾe.ʎas | es̪ˈt̪ɾe.ʎas | |
Estados Unidos | es̪ˌt̪a.d̪os uˈni.d̪os | es̪ˌt̪a.d̪os uˈni.d̪os | |
estación | es̪.t̪aˈʃõn | es̪.t̪aˈʃõn | |
gente | ˈxẽn̪.t̪e | ˈxẽn̪.t̪e | |
guerra | ˈɡe.ra | ˈɡe.ra | |
honra | ˈõn.ra | ˈõn.ra | |
hoy | ˈoi̯ | ˈoi̯ | |
lápiz | ˈla.pis | ˈla.pis | |
pollo | ˈpo.ʎo | ˈpo.ʎo | |
raíz | raˈis | raˈis | |
sol | ˈsol | ˈsol | |
soldao | sol̪ˈd̪a.o | sol̪ˈd̪a.o | |
tanque | ˈt̪ãŋ.ke | ˈt̪ãŋ.ke | |
tierra | ˈt͡ʃe.ra | ˈt͡ʃe.ra | |
yo | ˈɟ͡ʝo | ˈʝ͡ʝo |
tests = require("Module:UnitTests")
local m_cbk_pronunc = require("Module:cbk-pronunc")
local m_links = require('Module:links')
local options = { display = tag_IPA }
local cbk = require('Module:languages').getByCode('cbk')
local function cbk_IPA(IPA)
return '<span class="IPA">' .. IPA .. '</span>'
end
local function link(text)
return m_links.full_link{ term = text, lang = cbk }
end
function tests:check_phonetic_ipa(word, expected, respelling)
self:equals(
link(word) ..
(respelling and (" (respelled " .. respelling .. ")") or ""),
m_cbk_pronunc.IPA(word or respelling, true),
expected,
{ display = cbk_IPA }
)
end
function tests:test_phonetic_pron()
local examples = {
{ "accidente", "aɡ.siˈd̪ẽn̪.t̪e" },
{ "banco", "ˈbãŋ.ko"},
{ "batà", "ˈba.t̪aʔ" },
{ "casa", "ˈka.sa" },
{ "Chavacano", "t͡ʃa.baˈka.no" },
{ "colegio", "koˈle.xjo" },
{ "Dios", "ˈd͡ʒos" },
{ "dulce", "ˈd̪ul.se" },
{ "estrellas", "es̪ˈt̪ɾe.ʎas" },
{ "Estados Unidos", "es̪ˌt̪a.d̪os uˈni.d̪os" },
{ "estación", "es̪.t̪aˈʃõn"},
{ "gente", "ˈxẽn̪.t̪e" },
{ "guerra", "ˈɡe.ra" },
{ "honra", "ˈõn.ra"},
{ "hoy", "ˈoi̯"},
{ "lápiz", "ˈla.pis"},
{ "pollo", "ˈpo.ʎo" },
{ "raíz", "raˈis"},
{ "sol", "ˈsol" },
{ "soldao", "sol̪ˈd̪a.o" },
{ "tanque", "ˈt̪ãŋ.ke"},
{ "tierra", "ˈt͡ʃe.ra"},
{ "yo", "ˈɟ͡ʝo"},
}
self:iterate(examples, "check_phonetic_ipa")
end
return tests