Module:id-pronunciation/testcases
Jump to navigation
Jump to search
- 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 | |
anjang (respelled anjang ) | ˈan.d͡ʒaŋ | ˈan.d͡ʒaŋ | |
Cileunyi (respelled Cilenyī ) | 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ɛ.bruˈa.ri | fɛ.bruˈ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 ) | ɡɔnɡ | ˈɡ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òksemawè ) | lɔk̚.səˈma.wɛ | lɔk̚.səˈ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 ) | se.umpama | səmˈ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"},
{ "anjang", "ˈan.d͡ʒaŋ", "anjang" },
{ "Cileunyi", "t͡ʃi.ləˈɲi", "Cilenyī" },
{ "cuci","ˈt͡ʃu.t͡ʃi", "cuci"},
{ "daerah","daˈɛ.rah", "daèrah" },
{ "dakwa", "ˈdaʔ.wa", "daqwa"},
{ "datang","ˈda.t̪aŋ", "datang" },
{ "Februari","fɛ.bruˈa.ri", "Fè.bruari" },
{ "gajah", "ˈɡa.d͡ʒah", "gajah" },
{ "gelak", "ɡəˈlaʔ", "gelaq"},
{ "gereja","ɡəˈrɛ.d͡ʒa", "gerèja" },
{ "gong","ɡɔnɡ", "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òksemawè" },
{ "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", "se.umpama", "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