Module:lt-pron/testcases
Appearance
- The following documentation is located at Module:lt-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
6 of 20 tests failed. (refresh)
Text | Expected | Actual | Comments | |
---|---|---|---|---|
stovė́ti | stoːˈʋʲeː.tʲɪ | stoːˈʋʲêː.tʲɪ | ||
galià | ɡɐˈlʲɛ | ɡɐˈlʲɛ | ||
gàlia | ˈɡɐ.lʲɛ | ˈɡɐ.lʲɛ | ||
apniū̃kti | ɐpʲˈnʲuːk.tʲɪ | ɐpʲˈnʲuːk.tʲɪ | ||
pažìnti | pɐˈʑɪnʲ.tʲɪ | pɐˈʑɪnʲ.tʲɪ | ||
tamsùs | tɐmˈsʊs | tɐmˈsʊs | ||
abúojas | ɐˈbûə.jɐs | ɐˈbʊ̂ə.jɐs | ||
kóšė | ˈkôː.ɕeː | ˈkôː.ɕeː | ||
kõšė | ˈkoː.ɕeː | ˈkoː.ɕeː | ||
prie | pʲrʲiə | pʲrʲɪ.ɛ | ||
nórs | ˈnôːrs | ˈnôːrs | ||
gyvẽnimas | ɡʲiːˈʋʲɛː.nʲɪ.mɐs | ɡʲiːˈʋʲɛ.nʲɪ.mɐs | ||
kauburỹs | kɐʊ̯ˑ.bʊˈrʲiːs | kɐʊ̯.bʊˈrʲiːs |
Text | Expected | Actual | Comments | |
---|---|---|---|---|
pãieškos | pãjieškos | pãjieškos | ||
ievà | jievà | jievà | ||
diẽmedis | dʲiẽmʲedʲis | dʲiẽmʲedʲis | ||
apkeliáujanti | apʲkʲelʲiáujanʲtʲi | apʲkʲelʲiáujanʲtʲi | ||
apniū̃kti | apʲnʲū̃ktʲi | apʲnʲū̃ktʲi | ||
abchãzą | abçãzą | abçãzą | ||
biŏlŏ̀gija | bʲijɔlɔ̀gʲija | bʲiɔlɔ̀gʲija |
local tests = require("Module:UnitTests")
local m_IPA = require("Module:lt-pron")
local function tag_IPA(IPA)
return '<span class="IPA">' .. IPA .. '</span>'
end
function tests:check_IPA(term, func, expected, comment)
self:equals(
m_IPA.link(term),
tag_IPA(mw.ustring.toNFC(func(term))),
tag_IPA(expected),
{ comment = comment, show_difference = true }
)
end
function tests:test_pron()
local examples = {
{ "stovė́ti", "stoːˈʋʲeː.tʲɪ", "" },
{ "galià", "ɡɐˈlʲɛ", "" },
{ "gàlia", "ˈɡɐ.lʲɛ", "" },
{ "apniū̃kti", "ɐpʲˈnʲuːk.tʲɪ", "" },
{ "pažìnti", "pɐˈʑɪnʲ.tʲɪ", "" },
{ "tamsùs", "tɐmˈsʊs", "" },
{ "abúojas", "ɐˈbûə.jɐs", "" },
{ "kóšė", "ˈkôː.ɕeː", ""},
{ "kõšė", "ˈkoː.ɕeː", ""},
{ "prie", "pʲrʲiə", ""},
{ "nórs", "ˈnôːrs", ""},
{ "gyvẽnimas", "ɡʲiːˈʋʲɛː.nʲɪ.mɐs", ""},
{ "kauburỹs", "kɐʊ̯ˑ.bʊˈrʲiːs", ""},
}
--[[ Copy the following to add more examples:
{ "", "", "" },
]]
for _, example in ipairs(examples) do
local term, expected, comment = unpack(example)
self:check_IPA(term, m_IPA.toIPA, expected, comment)
end
end
function tests:test_respell()
local examples = {
{ "pãieškos", "pãjieškos", "" },
{ "ievà", "jievà", "" },
{ "diẽmedis", "dʲiẽmʲedʲis", "" },
{ "apkeliáujanti", "apʲkʲelʲiáujanʲtʲi", "" },
{ "apniū̃kti", "apʲnʲū̃ktʲi", "" },
{ "abchãzą", "abçãzą", "" },
{ "biŏlŏ̀gija", "bʲijɔlɔ̀gʲija", "" },
}
--[[ Copy the following to add more examples:
{ "", "", "" },
]]
for _, example in ipairs(examples) do
local term, expected, comment = unpack(example)
self:check_IPA(term, m_IPA.respell, expected, comment)
end
end
return tests