Jump to content

Module:tl-pron/sandbox/testcases

From Wiktionary, the free dictionary

49 of 49 tests failed. (refresh)

TextExpectedActual
test_phonetic_pron:
Failedalambreʔɐˈlam.bɾetable
Failedasambleaʔɐ.sɐmˈble.ɐtable
Failedasoˈʔa.sotable
Failedatrasʔɐtˈɾastable
Failedbaboyˈba.boɪ̯table
Failedbagabɐˈɣatable
Failedbakaˈba.xɐtable
Failedbakantebɐˈxan.tetable
Failedbaklabɐkˈlaʔtable
Failedbanyoˈba.ɲotable
Failedbanyerabɐˈɲe.ɾɐtable
FailedCarlosˈkxaɾ.lostable
FailedCebuseˈbutable
FailedCharlieˈt͡ʃaɾ.lɪtable
Faileddatingdɐˈtiŋtable
Faileddawdaʊ̯table
Faileddela Cruzdeˌla ˈkɾustable
Faileddigmaandɪɡˈma.ʔɐntable
Faileddilaˈdi.lɐʔtable
Faileddiyaryoˈd͡ʒaɾ.jotable
FailedDomingodoˈmiŋ.ɡotable
FailedFabianfɐbˈjantable
Failedfutbolˈfut.boltable
Failedhawlaˈhaʊ̯.lɐtable
Failedhingalˈhi.ŋɐltable
Failedhingalhɪˈŋaltable
Failedkongresokxoŋˈɡɾe.sotable
Failedkontraˈkxon.tɾɐtable
Failedkontratakxonˈtɾa.tɐtable
Failedkutsarakxʊˈt͡ʃa.ɾɐtable
Failedlaykoˈlaɪ̯.xotable
Failedligaliglɪˈɣa.lɪɡtable
Failedlutoˈlu.toʔtable
Failedlutolʊˈtoʔtable
FailedNiñaˈni.ɲɐtable
Failedpaklapɐkˈlatable
Failedpintopɪnˈtoʔtable
Failedsilindrosɪˈlin.dɾotable
Failedsuklaysʊkˈlaɪ̯table
Failedtatsuloktɐ.t͡sʊˈloktable
Failedtekaˈte.xɐtable
Failedtiyakˈt͡ʃaktable
Failedtransportasyontɾɐns.poɾ.tɐˈʃontable
Failedtsikoˈt͡ʃi.xotable
Failedulamˈʔu.lɐmtable
Faileduminomʔʊ.mɪˈnomtable
Faileduwakʔʊˈaktable
Failedyakapˈja.xɐptable
Failedzigzagˈsiɡ.sɐɡtable

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