Module:mai-IPA/testcases
Appearance
- The following documentation is located at Module:mai-IPA/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 | Comments | |
---|---|---|---|---|
आऒ (āo) | [ɔ] | [ɔ] | ||
ऒकरा (okᵊrā) | [okᵊɾaː] | [okᵊɾaː] | ||
छन्हि (chanhɨ) | [t͡ɕʰəɪnʱ] | [t͡ɕʰəɪnʱ] | ||
ऎकरा (ekᵊrā) | [ekᵊɾaː] | [ekᵊɾaː] | ||
ओकरा (ōkᵊrā) | [okᵊɾaː] | [okᵊɾaː] | ||
एकरा (ēkᵊrā) | [ekᵊɾaː] | [ekᵊɾaː] | ||
ॵ (ǒ) | [ɔ] | [ɔ] | ||
ꣾ (ě) | [ɛ] | [ɛ] | ||
कएल (kaēl) | [kəeːl] | [kəeːl] | ||
कय़ल (kaël) | [kæl] | [kæl] | ||
जाय़त (jāët) | [d͡ʑæt] | [d͡ʑæt] | ||
कऎल (kael) | [kæl] | [kæl] | ||
चारि (cārɨ) | [t͡ɕaːɪɾ] | [t͡ɕaːɪɾ] | ||
चॏमुख (cǒmukh) | [t͡ɕɔmʊkʰ] | [t͡ɕɔmʊkʰ] | ||
रवि (ravɨ) | [ɾəɪb] | [ɾəɪb] |
local tests = require("Module:UnitTests")
local m_IPA = require("Module:mai-IPA")
local function tag_IPA(IPA)
if phonetic then
IPA = '/' .. IPA .. '/'
else
IPA = '[' .. IPA .. ']'
end
return '<span class="IPA">' .. IPA .. '</span>'
end
function tests:check_output(term, expected, comment)
self:equals(
m_IPA.link(term),
tag_IPA(m_IPA.toIPA(term, "standard")),
tag_IPA(expected),
{ comment = comment }
)
end
function tests:test_phonetic()
examples = {
{ "आऒ", "ɔ" },
{ "ऒकरा", "okᵊɾaː" },
{ "छन्हि", "t͡ɕʰəɪnʱ"},
{"ऎकरा", "ekᵊɾaː"},
{ "ओकरा", "okᵊɾaː" },
{"एकरा", "ekᵊɾaː"},
{ "ॵ", "ɔ"},
{ "ꣾ", "ɛ"},
{ "कएल", "kəeːl" },
{ "कय़ल", "kæl" },
{ "जाय़त", "d͡ʑæt" },
{ "कऎल", "kæl" },
{ "चारि", "t͡ɕaːɪɾ" },
{ "चॏमुख", "t͡ɕɔmʊkʰ" },
{ "रवि", "ɾəɪb" },
}
tests:iterate(examples, "check_output")
end
return tests