Module:yo-pron/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:yo-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 | |
---|---|---|---|
Adébáyọ̀ | ā.dé.bá.jɔ̀ | ā.dé.bá.jɔ̀ | |
ẹẹ́sàn-ándínláàádọ́sàn-án | ɛ̄ɛ́.sã̀ã́.dĩ́.láàá.dɔ́.sã̀ã́ | ɛ̄ɛ́.sã̀ã́.dĩ́.láàá.dɔ́.sã̀ã́ | |
Ẹ káàárọ̀ | ɛ̄ káàá.ɾɔ̀ | ɛ̄ káàá.ɾɔ̀ | |
kò | kò | kò | |
kọ̀m̀pútà | kɔ̀.ŋ̀.k͡pú.tà | kɔ̀.ŋ̀.k͡pú.tà | |
nàá | nã̀ã́ | nã̀ã́ | |
oghó | ō.ɣó | ō.ɣó | |
sẹngwà | sɛ̃̄.ɡʷà | sɛ̃̄.ɡʷà | |
ụ̀ṣà | ʊ̀.ʃà | ʊ̀.ʃà | |
ị̀kàrà | ɪ̀.kà.ɾà | ɪ̀.kà.ɾà | |
n̄ǹkan | ŋ̄ŋ̀.kã̄ | ŋ̄ŋ̀.kã̄ | |
Ṣáínà | ʃá.í.nà | ʃá.í.nà | |
Yorùbá | jō.ɾù.bá | jō.ɾù.bá | |
márùn-ún | má.ɾũ̀ṹ | má.ɾũ̀ṹ | |
ẹ̀ẹ́dẹ́gbẹ̀rùn-ún lọ́ná | ɛ̀ɛ́.dɛ́.ɡ͡bɛ̀.ɾũ̀ṹ lɔ́.nã́ | ɛ̀ɛ́.dɛ́.ɡ͡bɛ̀.ɾũ̀ṹ lɔ́.nã́ | |
lálá | lá.lá | lá.lá | |
lálá | lá.ꜜlá | lá.ꜜlá |
local tests = require("Module:UnitTests")
local m_IPA = require("Module:yo-pron")
local lang = require("Module:languages").getByCode("yo")
local function tag_IPA(IPA) return '<span class="IPA">' .. IPA .. '</span>' end
local options = {display = tag_IPA}
function tests:check_pron(word, expected, loan, downstep)
self:equals(
require("Module:links").full_link({term = word, lang = lang}, nil, true), m_IPA.IPA(word, loan, downstep), expected, options
)
end
function tests:test_pron()
local examples = {
{"Adébáyọ̀", "ā.dé.bá.jɔ̀" },
{"ẹẹ́sàn-ándínláàádọ́sàn-án", "ɛ̄ɛ́.sã̀ã́.dĩ́.láàá.dɔ́.sã̀ã́"},
{"Ẹ káàárọ̀", "ɛ̄ káàá.ɾɔ̀"},
{"kò", "kò" },
{"kọ̀m̀pútà", "kɔ̀.ŋ̀.k͡pú.tà"},
{"nàá", "nã̀ã́"},
{"oghó", "ō.ɣó"},
{"sẹngwà", "sɛ̃̄.ɡʷà"},
{"ụ̀ṣà", "ʊ̀.ʃà"},
{"ị̀kàrà", "ɪ̀.kà.ɾà"},
{"n̄ǹkan", "ŋ̄ŋ̀.kã̄"},
{"Ṣáínà", "ʃá.í.nà", "1"},
{"Yorùbá", "jō.ɾù.bá" },
{"márùn-ún", "má.ɾũ̀ṹ"},
{"ẹ̀ẹ́dẹ́gbẹ̀rùn-ún lọ́ná", "ɛ̀ɛ́.dɛ́.ɡ͡bɛ̀.ɾũ̀ṹ lɔ́.nã́"},
{"lálá", "lá.lá"},
{"lálá", "lá.ꜜlá", "0", "2"}
}
tests:iterate(examples, "check_pron")
end
return tests