Module:id-pronunciation/testcases
Appearance
- The following documentation is located at Module:id-pronunciation/testcases/documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
4 of 36 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
air (respelled air ) | ˈa.ɪr | ˈa.ɪr | |
Alqur'an (respelled Alkur.ān ) | al.kurˈan | al.kurˈan | |
anjing (respelled anjing ) | ˈan.d͡ʒɪŋ | ˈan.d͡ʒɪŋ | |
Cileunyi (respelled Cilenyi ) | ˈt͡ʃi.lə.ɲi | ˈt͡ʃi.lə.ɲi | |
cuci (respelled cuci ) | ˈt͡ʃu.t͡ʃi | ˈt͡ʃu.t͡ʃi | |
daerah (respelled daèrah ) | daˈɛ.rah | daˈɛ.rah | |
dakwa (respelled daqwa ) | ˈdaʔ.wa | ˈdaʔ.wa | |
datang (respelled datang ) | ˈda.t̪aŋ | ˈda.t̪aŋ | |
Februari (respelled Fèbruari ) | fɛpruˈa.ri | fɛp̚.ruˈa.ri | |
gajah (respelled gajah ) | ˈɡa.d͡ʒah | ˈɡa.d͡ʒah | |
gelak (respelled gelaq ) | ɡəˈlaʔ | ɡəˈlaʔ | |
gereja (respelled gerèja ) | ɡəˈrɛ.d͡ʒa | ɡəˈrɛ.d͡ʒa | |
gong (respelled gong ) | ˈɡoŋ | ˈɡoŋ | |
gunung (respelled gunung ) | ˈɡu.nʊŋ | ˈɡu.nʊŋ | |
hijau (respelled hijau ) | ˈhi.d͡ʒau̯ | ˈhi.d͡ʒau̯ | |
khidmat (respelled khidmat ) | ˈxit̪̚.mat̪̚ | ˈxit̪̚.mat̪̚ | |
instan (respelled instan ) | in.stan | ˈins.t̪an | |
laut (respelled laut ) | ˈla.ʊt̪̚ | ˈla.ʊt̪̚ | |
Lhokseumawe (respelled Lòkseumawè ) | lɔk̚.səˈma.wɛ | lɔk̚.sə.uˈma.wɛ | |
nasionalisme (respelled nasionalisme ) | na.si.o.naˈlis.mə | na.si.o.naˈlis.mə | |
nikmat (respelled niqmat ) | ˈniʔ.mat̪̚ | ˈniʔ.mat̪̚ | |
-nya (respelled -nya ) | ɲa | ˈɲa | |
pakaian (respelled pakaian ) | paˈka.jan | paˈka.jan | |
pantai (respelled pantai ) | ˈpan.t̪ai̯ | ˈpan.t̪ai̯ | |
praktik (respelled praktik ) | ˈprak̚.t̪ɪk̚ | ˈprak̚.t̪ɪk̚ | |
pria (respelled pria ) | ˈpri.a | ˈpri.a | |
provinsi (respelled provinsi ) | proˈfin.si | proˈfin.si | |
pulau (respelled pulau ) | ˈpu.lau̯ | ˈpu.lau̯ | |
rakyat (respelled raqyat ) | ˈraʔ.jat̪̚ | ˈraʔ.jat̪̚ | |
selamat (respelled selamat ) | səˈla.mat̪̚ | səˈla.mat̪̚ | |
seumpama (respelled seumpama ) | sə.umˈpa.ma | sə.umˈpa.ma | |
siomay (respelled siomay ) | siˈo.mai̯ | siˈo.mai̯ | |
syarat (respelled syarat ) | ˈʃa.rat̪̚ | ˈʃa.rat̪̚ | |
telur (respelled telur ) | t̪əˈlʊr | t̪əˈlʊr | |
tidak (respelled tidaq ) | ˈt̪i.daʔ | ˈt̪i.daʔ | |
Tionghoa (respelled Tionghoa ) | t̪i.oŋˈho.a | t̪i.oŋˈho.a |
local tests = require("Module:UnitTests")
local m_id_pron = require("Module:id-pronunciation")
local function id_IPA(IPA)
return "<span class='IPA'>" .. IPA .. "</span>"
end
local function id_spelling(spelling)
return "<code>" .. spelling .. "</code>"
end
local function display_text_and_respelling(text, respelling)
return ("[[%s#Indonesian|%s]] (respelled %s)"):format(text, text, id_spelling(respelling))
end
function tests:check_phonetic_ipa(text, expected, respelling)
self:equals(
display_text_and_respelling(text, respelling),
m_id_pron.IPA(respelling)["phonetic"],
expected,
{ display = id_IPA }
)
end
function tests:test_phonetic_pron()
local examples = {
{ "air", "ˈa.ɪr", "air" },
{ "Alqur'an", "al.kurˈan", "Alkur.ān"},
{ "anjing", "ˈan.d͡ʒɪŋ", "anjing" },
{ "Cileunyi", "ˈt͡ʃi.lə.ɲi", "Cilenyi" },
{ "cuci","ˈt͡ʃu.t͡ʃi", "cuci"},
{ "daerah","daˈɛ.rah", "daèrah" },
{ "dakwa", "ˈdaʔ.wa", "daqwa"},
{ "datang","ˈda.t̪aŋ", "datang" },
{ "Februari","fɛpruˈa.ri", "Fèbruari" },
{ "gajah", "ˈɡa.d͡ʒah", "gajah" },
{ "gelak", "ɡəˈlaʔ", "gelaq"},
{ "gereja","ɡəˈrɛ.d͡ʒa", "gerèja" },
{ "gong","ˈɡoŋ", "gong" },
{ "gunung","ˈɡu.nʊŋ", "gunung" },
{ "hijau","ˈhi.d͡ʒau̯", "hijau" },
{ "khidmat", "ˈxit̪̚.mat̪̚", "khidmat"},
{ "instan", "in.stan", "instan"},
{ "laut", "ˈla.ʊt̪̚", "laut" },
{ "Lhokseumawe", "lɔk̚.səˈma.wɛ", "Lòkseumawè" },
{ "nasionalisme", "na.si.o.naˈlis.mə", "nasionalisme" },
{ "nikmat", "ˈniʔ.mat̪̚", "niqmat" },
{ "-nya","ɲa", "-nya" },
{ "pakaian","paˈka.jan", "pakaian" },
{ "pantai", "ˈpan.t̪ai̯", "pantai" },
{ "praktik", "ˈprak̚.t̪ɪk̚", "praktik" },
{ "pria", "ˈpri.a", "pria"},
{ "provinsi", "proˈfin.si", "provinsi"},
{ "pulau", "ˈpu.lau̯", "pulau" },
{ "rakyat", "ˈraʔ.jat̪̚", "raqyat"},
{ "selamat", "səˈla.mat̪̚", "selamat"},
{ "seumpama", "sə.umˈpa.ma", "seumpama"},
{ "siomay", "siˈo.mai̯", "siomay"},
{ "syarat", "ˈʃa.rat̪̚", "syarat"},
{ "telur", "t̪əˈlʊr", "telur"},
{ "tidak", "ˈt̪i.daʔ", "tidaq"},
{ "Tionghoa", "t̪i.oŋˈho.a", "Tionghoa"},
}
self:iterate(examples, "check_phonetic_ipa")
end
return tests