Module:sandbox/id-pronunciation/testcases

Hello, you have come here looking for the meaning of the word Module:sandbox/id-pronunciation/testcases. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:sandbox/id-pronunciation/testcases, but we will also tell you about its etymology, its characteristics and you will know how to say Module:sandbox/id-pronunciation/testcases in singular and plural. Everything you need to know about the word Module:sandbox/id-pronunciation/testcases you have here. The definition of the word Module:sandbox/id-pronunciation/testcases will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:sandbox/id-pronunciation/testcases, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

All tests passed. (refresh)

TextExpectedActual
test_phonetic_pron:
Passedair (respelled air)ˈa.irˈa.ir
Passedanjing (respelled anjing)ˈaɲ.d͡ʒɪŋˈaɲ.d͡ʒɪŋ
PassedCileunyi (respelled Cileunyī)t͡ʃi.lɨˈɲit͡ʃi.lɨˈɲi
Passedcuci (respelled cuci)ˈt͡ʃu.t͡ʃiˈt͡ʃu.t͡ʃi
Passeddaerah (respelled daèrah)daˈɛ.rahdaˈɛ.rah
Passeddakwa (respelled daqwa)ˈdaʔ.waˈdaʔ.wa
Passeddatang (respelled datang)ˈda.t̪aŋˈda.t̪aŋ
PassedFebruari (respelled Fè.bruari)fɛ.bruˈa.rifɛ.bruˈa.ri
Passedgajah (respelled gajah)ˈɡa.d͡ʒahˈɡa.d͡ʒah
Passedgelak (respelled gelaq)ɡəˈlaʔɡəˈlaʔ
Passedgereja (respelled gerèja)ɡəˈrɛ.d͡ʒaɡəˈrɛ.d͡ʒa
Passedgunung (respelled gunung)ˈɡu.nʊŋˈɡu.nʊŋ
Passedhijau (respelled hijau)ˈhi.d͡ʒau̯ˈhi.d͡ʒau̯
Passedkhidmat (respelled khidmat)ˈxit̪̚.mat̪ˈxit̪̚.mat̪
Passedlaut (respelled laut)ˈla.ut̪ˈla.ut̪
PassedLhokseumawe (respelled loqseumawè)loʔ.sɨˈma.wɛloʔ.sɨˈma.wɛ
Passednasionalisme (respelled nasionalisme)na.si.o.naˈlis.məna.si.o.naˈlis.mə
Passednikmat (respelled niqmat)ˈniʔ.mat̪ˈniʔ.mat̪
Passed-nya (respelled nya)ɲaɲa
Passedpakaian (respelled pakaian)paˈka.janpaˈka.jan
Passedpantai (respelled pantai)ˈpan.t̪ai̯ˈpan.t̪ai̯
Passedpria (respelled pria)ˈpri.aˈpri.a
Passedprovinsi (respelled provinsi)proˈfiɲ.siproˈfiɲ.si
Passedpulau (respelled pulau)ˈpu.lau̯ˈpu.lau̯
PassedQuran (respelled Kurān)kuˈrankuˈran
Passedrakyat (respelled raqyat)ˈraʔ.jat̪ˈraʔ.jat̪
Passedselamat (respelled selamat)səˈla.mat̪səˈla.mat̪
Passedsiomay (respelled siomay)siˈo.mai̯siˈo.mai̯
Passedsyarat (respelled syarat)ˈʃa.rat̪ˈʃa.rat̪
Passedtelur (respelled telur)t̪əˈlʊrt̪əˈlʊr
Passedtidak (respelled tidaq)ˈt̪i.daʔˈt̪i.daʔ
PassedTionghoa (respelled Tionghoa)t̪i.oŋˈho.at̪i.oŋˈho.a

local tests = require("Module:UnitTests")
local m_id_pron = require("Module:sandbox/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 ("] (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),
		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