मॉड्यूल:tl-pron/sandbox/testcases
दिखावट
"इस मॉड्यूल हेतु प्रलेख मॉड्यूल:tl-pron/sandbox/testcases/doc पर बनाया जा सकता है"
local tests = require("Module:UnitTests")
local m_tl_pron = require("Module:tl-pron/sandbox")
local function tag_IPA(IPA)
return "<span class='IPA'>" .. IPA .. "</span>"
end
local options = { display = tag_IPA }
function tests:check_phonetic_ipa(text, expected, respelling)
self:equals(
"[[" .. text .. "#Tagalog|" .. text .. "]]",
m_tl_pron.IPA(respelling, true),
expected,
{ display = tag_IPA }
)
end
function tests:test_phonetic_pron()
local examples = {
{ "alambre", "ʔɐˈlam.bɾe", "alambre" },
{ "asamblea", "ʔɐ.sɐmˈble.ɐ", "asamblea" },
{ "aso", "ˈʔa.so", "aso" },
{ "atras", "ʔɐtˈɾas", "atrás" },
{ "baboy","ˈba.boɪ̯", "baboy" },
{ "baga","bɐˈɣa", "bagá" },
{ "baka","ˈba.xɐ", "baka" },
{ "bakante","bɐˈxan.te", "bakante" },
{ "bakla","bɐkˈlaʔ", "baklá7" },
{ "banyo","ˈba.ɲo", "banyo" },
{ "banyera","bɐˈɲe.ɾɐ", "banyera" },
{ "Carlos","ˈkxaɾ.los","Carlos"},
{ "Cebu","seˈbu","Cebú"},
{ "Charlie","ˈt͡ʃaɾ.lɪ", "Charli"},
{ "dating","dɐˈtiŋ", "datíng" },
{ "daw","daʊ̯", "daw" },
{ "dela Cruz", "deˌla ˈkɾus", "delá Cruz" },
{ "digmaan", "dɪɡˈma.ʔɐn", "digma7an" },
{ "dila", "ˈdi.lɐʔ", "dila7" },
{ "diyaryo","ˈd͡ʒaɾ.jo", "diyaryo" },
{ "Domingo", "doˈmiŋ.ɡo", "Domin.go"},
{ "Fabian","fɐbˈjan", "Fabyán" },
{ "futbol", "ˈfut.bol", "futbol" },
{ "hawla","ˈhaʊ̯.lɐ", "hawla" },
{ "hingal","ˈhi.ŋɐl", "hingal" },
{ "hingal","hɪˈŋal", "hingál" },
{ "kongreso", "kxoŋˈɡɾe.so", "kon.greso"},
{ "kontra", "ˈkxon.tɾɐ", "kontra" },
{ "kontrata", "kxonˈtɾa.tɐ", "kontrata" },
{ "kutsara","kxʊˈt͡ʃa.ɾɐ","kutsara"},
{ "layko","ˈlaɪ̯.xo", "layko" },
{ "ligalig","lɪˈɣa.lɪɡ","ligalig"},
{ "luto","ˈlu.toʔ","luto7"},
{ "luto","lʊˈtoʔ","lutó7"},
{ "Niña","ˈni.ɲɐ","Niña"},
{ "pakla","pɐkˈla", "paklá" },
{ "pinto","pɪnˈtoʔ","pintó7"},
{ "silindro", "sɪˈlin.dɾo", "silindro" },
{ "suklay","sʊkˈlaɪ̯", "sukláy" },
{ "tatsulok","tɐ.t͡sʊˈlok","tat.sulók"},
{ "teka","ˈte.xɐ", "teka" },
{ "tiyak","ˈt͡ʃak","tiyák"},
{ "transportasyon", "tɾɐns.poɾ.tɐˈʃon", "transportasyón" },
{ "tsiko","ˈt͡ʃi.xo","tsiko"},
{ "ulam","ˈʔu.lɐm","ulam"},
{ "uminom","ʔʊ.mɪˈnom", "uminóm" },
{ "uwak","ʔʊˈak","uwák"},
{ "yakap", "ˈja.xɐp", "yakap"},
{ "zigzag","ˈsiɡ.sɐɡ", "zigzag" },
}
self:iterate(examples, "check_phonetic_ipa")
end
return tests