Module:id-pronunciation/sandbox/testcases
- The following documentation is located at Module:id-pronunciation/sandbox/testcases/documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox of (diff)
All tests passed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
![]() | air (respelled air ) | ˈa.ir | ˈa.ir |
![]() | anjing (respelled anjing ) | ˈaɲ.d͡ʒɪŋ | ˈaɲ.d͡ʒɪŋ |
![]() | Cileunyi (respelled Cileunyī ) | 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 |
![]() | gunung (respelled gunung ) | ˈɡu.nʊŋ | ˈɡu.nʊŋ |
![]() | hijau (respelled hijau ) | ˈhi.d͡ʒau̯ | ˈhi.d͡ʒau̯ |
![]() | khidmat (respelled khidmat ) | ˈxit̪̚.mat̪ | ˈxit̪̚.mat̪ |
![]() | laut (respelled laut ) | ˈla.ut̪ | ˈla.ut̪ |
![]() | Lhokseumawe (respelled loqseumawè ) | loʔ.sɨˈma.wɛ | loʔ.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̯ |
![]() | pria (respelled pria ) | ˈpri.a | ˈpri.a |
![]() | provinsi (respelled provinsi ) | proˈfiɲ.si | proˈfiɲ.si |
![]() | pulau (respelled pulau ) | ˈpu.lau̯ | ˈpu.lau̯ |
![]() | Quran (respelled Kurān ) | kuˈran | kuˈran |
![]() | rakyat (respelled raqyat ) | ˈraʔ.jat̪ | ˈraʔ.jat̪ |
![]() | selamat (respelled selamat ) | səˈla.mat̪ | səˈla.mat̪ |
![]() | 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-pron/sandbox")
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.ir", "air" },
{ "anjing", "ˈaɲ.d͡ʒɪŋ", "anjing" },
{ "Cileunyi", "t͡ʃi.lɨˈɲi", "Cileunyī" },
{ "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" },
{ "gunung","ˈɡu.nʊŋ", "gunung" },
{ "hijau","ˈhi.d͡ʒau̯", "hijau" },
{ "khidmat", "ˈxit̪̚.mat̪", "khidmat"},
{ "laut", "ˈla.ut̪", "laut" },
{ "Lhokseumawe", "loʔ.sɨˈma.wɛ", "loqseumawè" },
{ "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" },
{ "pria", "ˈpri.a", "pria"},
{ "provinsi", "proˈfiɲ.si", "provinsi"},
{ "pulau", "ˈpu.lau̯", "pulau" },
{ "Quran", "kuˈran", "Kurān"},
{ "rakyat", "ˈraʔ.jat̪", "raqyat"},
{ "selamat", "səˈla.mat̪", "selamat"},
{ "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