Module:User:Sameerhameedy/fa-IPA/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:User:Sameerhameedy/fa-IPA/testcases/documentation. [edit] Categories were auto-generated by Module:documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • user page • user talk page • userspace
11 of 22 tests failed. (refresh)
Term | Respelling | Expected | Actual | Comments | |
---|---|---|---|---|---|
خواب | xwāb | χɔːb̥ | xɔːb̥ | ||
ابرنواختر | abarnaw.ax`tar | ʔä.bäɾ.näw.äχ.t̪ʰǽɾ | ʔä.bäɾ.näw.ʔäx.t̪ʰǽɾ | ||
ابراهیم | ibrā`hīm | ʔib.ɾɔː.jíːm | ʔib.ɾɔː.jíːm | ||
امام | i`mām | ʔi.mɔ́ːm | ʔi.mɔ́ːm | ||
پیشوا | pēš`vā | pʰeːʃ.wɔ́ː | pʰeːʃ.wɔ́ː | ||
مستعمره | musta'ma`ra | mus.t̪ʰɔː.mä.ɾǽ | mus.t̪ʰɔː.mä.ɾǽ | ||
آزاد | ā`zād | ʔɔː.zɔ́ːd̪̥ | ʔɔː.zɔ́ːd̪̥ | ||
معتدل | mu'tadil | mʊː.t̪ʰä.d̪il̥ | mʊː.t̪ʰä.d̪il̥ | ||
خوید | xwēd | χeːd̪̥ | xeːd̪̥ | ||
محمد | muhammad | mu.wäm.mäd̪̥ | mu.wäm.mäd̪̥ | ||
لیکن | lēkin | li.kʰin | li.kʰin | ||
دندان | dandān | d̪än̪.d̪ɔːn | d̪än̪.d̪ɔːn | ||
بند | band | bän̪d̪̥ | bän̪d̪̥ | ||
کٹه | kaTa | kʰä.ʈä | kʰä.ʈä |
Term | Respelling | Expected | Actual | Comments | |
---|---|---|---|---|---|
خوش | xwaš | χʊʃ | xʊʃ | ||
خواب | xwāb | χʌːb | xɑːb | ||
ابرنواختر | abarnaw.ax`tar | ʔä.bäɾ.näw.äχ.t̪ʰǽɾ | ʔä.bäɾ.näw.ʔäx.t̪ʰǽɾ | ||
ابراهیم | ibrā`hīm | ʔɪb.ɾʌː.jíːm | ʔɪb.ɾɑː.jíːm | ||
پیشوا | pēš`vā | pʰeːʃ.wʌ́ː | pʰeːʃ.wɑ́ː | ||
مستعمره | musta'ma`ra | mʊs.t̪ʰʌː.mä.ɾǽ | mʊs.t̪ʰɑː.mä.ɾǽ | ||
معتدل | mu'tadil | moː.t̪ʰä.d̪ɪl | moː.t̪ʰä.d̪ɪl | ||
محمد | muhammad | mʊ.wäm.mäd̪ | mʊ.wäm.mäd̪ |
local tests = require("Module:UnitTests")
local m_IPA = require("Module:fa-IPA/sandbox")
local sc_fa = require("Module:scripts").getByCode("fa-Arab")
local sc_tg = require("Module:scripts").getByCode("Cyrl")
local lang_fa = require("Module:languages").getByCode("fa")
local lang_tg = require("Module:languages").getByCode("tg")
function link(term)
return require("Module:links").full_link {
term = term,
lang = lang_fa,
sc = sc_fa
}
end
function link_tg(term)
return require("Module:links").full_link {
term = term,
lang = lang_tg,
sc = sc_tg
}
end
local function tag_IPA(IPA)
return '<span class="IPA">' .. IPA .. '</span>'
end
function tests:check_output_fa(term, romanisation, expected)
self:equals(
{link(term), romanisation},
tag_IPA(m_IPA.fa_IPA(romanisation)),
tag_IPA(expected)
)
end
function tests:check_output_prs_kbl(term, romanisation, expected)
self:equals(
{link(term), romanisation},
tag_IPA(m_IPA.prs_kbl_IPA(romanisation)),
tag_IPA(expected)
)
end
function tests:check_output_prs_haz(term, romanisation, expected)
self:equals(
{link(term), romanisation},
tag_IPA(m_IPA.prs_haz_IPA(romanisation)),
tag_IPA(expected)
)
end
function tests:check_output_fa_cls(term, romanisation, expected)
self:equals(
{link(term), romanisation},
tag_IPA(m_IPA.fa_cls_IPA(romanisation)),
tag_IPA(expected)
)
end
function tests:check_output_tg(term, romanisation, expected)
self:equals(
{link(term), romanisation},
tag_IPA(m_IPA.tg_IPA(romanisation)),
tag_IPA(expected)
)
end
function tests:check_output_prs(term, romanisation, expected)
self:equals(
{link(term), romanisation},
tag_IPA(m_IPA.prs_IPA(romanisation)),
tag_IPA(expected)
)
end
function tests:test_kbl_persian()
examples = {
{ "خوش", "xwaš", "χʊʃ"},
{ "خواب", "xwāb", "χʌːb"},
{ "ابرنواختر", "abarnaw.ax`tar", "ʔä.bäɾ.näw.äχ.t̪ʰǽɾ"},
{ "ابراهیم", "ibrā`hīm", "ʔɪb.ɾʌː.jíːm"},
{ "پیشوا", "pēš`vā", "pʰeːʃ.wʌ́ː"},
{ "مستعمره", "musta'ma`ra", "mʊs.t̪ʰʌː.mä.ɾǽ"},
{ "معتدل", "mu'tadil", "moː.t̪ʰä.d̪ɪl"},
{ "محمد", "muhammad", "mʊ.wäm.mäd̪"},
}
--[[ Copy the following to add more examples:
{ "", "", ""},
]]
tests:iterate(examples, "check_output_prs_kbl")
end
function tests:test_haz_persian()
examples = {
{ "خواب", "xwāb", "χɔːb̥"},
{ "ابرنواختر", "abarnaw.ax`tar", "ʔä.bäɾ.näw.äχ.t̪ʰǽɾ"},
{ "ابراهیم", "ibrā`hīm", "ʔib.ɾɔː.jíːm"},
{ "امام", "i`mām", "ʔi.mɔ́ːm"},
{ "پیشوا", "pēš`vā", "pʰeːʃ.wɔ́ː"},
{ "مستعمره", "musta'ma`ra", "mus.t̪ʰɔː.mä.ɾǽ"},
{ "آزاد", "ā`zād", "ʔɔː.zɔ́ːd̪̥"},
{ "معتدل", "mu'tadil", "mʊː.t̪ʰä.d̪il̥"},
{ "خوید", "xwēd", "χeːd̪̥"},
{ "محمد", "muhammad", "mu.wäm.mäd̪̥"},
{ "لیکن", "lēkin", "li.kʰin"},
{ "دندان", "dandān", "d̪än̪.d̪ɔːn"},
{ "بند", "band", "bän̪d̪̥"},
{ "کٹه", "kaTa", "kʰä.ʈä"},
}
--[[ Copy the following to add more examples:
{ "", "", ""},
]]
tests:iterate(examples, "check_output_prs_haz")
end
return tests