Module:ms-pron/testcases
Appearance
- The following documentation is located at Module:ms-pron/testcases/documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
1 of 25 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
air | ˈa.er | ˈa.er | |
anjing | ˈaɲ.d͡ʒeŋ | ˈaɲ.d͡ʒeŋ | |
baik | ˈba.eʔ | ˈba.eʔ | |
buka | ˈbu.kə | ˈbu.kə | |
cuci | ˈt͡ʃu.t͡ʃi | ˈt͡ʃu.t͡ʃi | |
datang | ˈda.t̪aŋ | ˈda.t̪aŋ | |
Februari | fep.ruˈa.ri | fep.ruˈa.ri | |
gajah | ˈɡa.d͡ʒah | ˈɡa.d͡ʒah | |
gereja | ɡəˈre.d͡ʒə | ɡəˈre.d͡ʒə | |
gunung | ˈɡu.noŋ | ˈɡu.noŋ | |
hijau | ˈhi.d͡ʒau̯ | ˈhi.d͡ʒau̯ | |
khidmat | ˈxit̪.mat̪ | ˈxit̪.mat̪ | |
laut | ˈla.ot̪ | ˈla.ot̪ | |
nasionalisme | na.sjo.naˈlis.mə | na.sjo.naˈlis.mə | |
nikmat | ˈniʔ.mat̪ | ˈniʔ.mat̪ | |
-nya | ɲə | ɲə | |
pakaian | paˈka.jan | paˈka.jan | |
pantai | ˈpan.t̪ai̯ | ˈpan.t̪ai̯ | |
peria | pəˈrjə | ˈpə.rjə | |
pulau | ˈpu.lau̯ | ˈpu.lau̯ | |
Qur'an | quˈran | quˈran | |
rakyat | ˈraʔ.jat̪ | ˈraʔ.jat̪ | |
selamat | səˈla.mat̪ | səˈla.mat̪ | |
syarat | ˈʃa.rat̪ | ˈʃa.rat̪ | |
tidak | ˈt̪i.daʔ | ˈt̪i.daʔ |
local tests = require("Module:UnitTests")
local m_ms_pron = require("Module:ms-pron")
local function ms_IPA(IPA)
return "<span class='IPA'>" .. IPA .. "</span>"
end
local options = { display = Ms_IPA }
function tests:check_phonetic_ipa(text, expected, respelling)
self:equals(
"[[" .. text .. "#Malay|" .. text .. "]]",
m_ms_pron.IPA(respelling, true),
expected,
{ display = ms_IPA }
)
end
function tests:test_phonetic_pron()
local examples = {
{ "air", "ˈa.er", "aér" },
{ "anjing", "ˈaɲ.d͡ʒeŋ", "anjéng" },
{ "baik", "ˈba.eʔ", "baék" },
{ "buka", "ˈbu.kə", "būke" },
{ "cuci","ˈt͡ʃu.t͡ʃi", "cuci"},
{ "datang","ˈda.t̪aŋ", "datang" },
{ "Februari","fep.ruˈa.ri", "Fébru.ari" },
{ "gajah", "ˈɡa.d͡ʒah", "gajah" },
{ "gereja","ɡəˈre.d͡ʒə", "geréje" },
{ "gunung","ˈɡu.noŋ", "gunong" },
{ "hijau","ˈhi.d͡ʒau̯", "hijau" },
{ "khidmat", "ˈxit̪.mat̪", "khidmat"},
{ "laut", "ˈla.ot̪", "laot" },
{ "nasionalisme", "na.sjo.naˈlis.mə", "na.sionalisme" },
{ "nikmat", "ˈniʔ.mat̪", "ni7mat" },
{ "-nya","ɲə", "-nye" },
{ "pakaian","paˈka.jan", "pakaian" },
{ "pantai", "ˈpan.t̪ai̯", "pantai" },
{ "peria", "pəˈrjə", "perie"},
{ "pulau", "ˈpu.lau̯", "pulau" },
{ "Qur'an", "quˈran", "qurān"},
{ "rakyat", "ˈraʔ.jat̪", "rak.yat" },
{ "selamat", "səˈla.mat̪", "selamat"},
{ "syarat", "ˈʃa.rat̪", "syarat"},
{ "tidak", "ˈt̪i.daʔ", "tidak"},
}
self:iterate(examples, "check_phonetic_ipa")
end
return tests