All tests passed. (refresh)

TextExpectedActual
test_phonetic_pron:
Passedaldawʔal̪ˈd̪aʊ̯ʔal̪ˈd̪aʊ̯
Passedanyilʔaˈɲil̪ʔaˈɲil̪
Passedasoˈʔa.soˈʔa.so
Passedbaakˈbaʔ.akˈbaʔ.ak
Passedbabayebaˈba.jebaˈba.je
Passedbagaˈba.ɡaʔˈba.ɡaʔ
Passedbagabaˈɡaʔbaˈɡaʔ
Passedbakaˈba.kaˈba.ka
Passedbaklabakˈl̪aʔbakˈl̪aʔ
Passedbanyoˈba.ɲoˈba.ɲo
Passedbaretabaˈɾe.taʔbaˈɾe.taʔ
Passedbasogbaˈsoɡbaˈsoɡ
Passedbitaogbiˈtaʔ.oɡbiˈtaʔ.oɡ
PassedCamarines Surka.maˈɾi.n̪es suɾka.maˈɾi.n̪es suɾ
PassedCarlosˈkaɾ.l̪osˈkaɾ.l̪os
Passeddaanˈd̪aʔ.an̪ˈd̪aʔ.an̪
Passeddatongd̪aˈtoŋd̪aˈtoŋ
Passeddilaˈd̪i.l̪aʔˈd̪i.l̪aʔ
Passeddiyaryoˈd͡ʒaɾ.joˈd͡ʒaɾ.jo
Passeddominggod̪oˈmiŋ.ɡod̪oˈmiŋ.ɡo
Passedduwaˈd̪waˈd̪wa
Passedhadokhaˈd̪okhaˈd̪ok
Passedhagokˈhaʔ.ɡokˈhaʔ.ɡok
Passedhiwaˈhi.waʔˈhi.waʔ
Passedhiwaonhiˈwaʔ.on̪hiˈwaʔ.on̪
Passedinaʔiˈn̪aʔiˈn̪a
Passedkabaongkaˈbaʔ.oŋkaˈbaʔ.oŋ
Passedkatreˈkat.ɾeˈkat.ɾe
Passedlagadil̪aˈɡa.d̪iʔl̪aˈɡa.d̪iʔ
Passedlapidaˈl̪a.pi.d̪aˈl̪a.pi.d̪a
Passedlayaˈl̪aʔ.jaˈl̪aʔ.ja
PassedLegazpil̪eˈɡas.pil̪eˈɡas.pi
Passedligwanl̪iɡˈwan̪l̪iɡˈwan̪
Passedlinogˈl̪i.n̪oɡˈl̪i.n̪oɡ
Passedluobl̪uʔˈobl̪uʔˈob
Passedlutoˈl̪u.toʔˈl̪u.toʔ
PassedNiñoˈn̪i.ɲoˈn̪i.ɲo
Passedngangaˈŋa.ŋaˈŋa.ŋa
Passedpaklapakˈl̪apakˈl̪a
Passedparakolpa.ɾaˈkol̪pa.ɾaˈkol̪
Passedpintopin̪ˈtoʔpin̪ˈtoʔ
Passedpulopuˈl̪oʔpuˈl̪oʔ

local tests = require("Module:UnitTests")
local m_bcl_pron = require("Module:bcl-pron")

local function tag_IPA(IPA)
	return "<span class='IPA'>" .. IPA .. "</span>"
end

function tests:check_phonetic_ipa(text, expected, respelling)
	self:equals(
		"[[" .. text .. "#Bikol Central|" .. text .. "]]",
		m_bcl_pron.IPA(respelling, true),
		expected,
		{ display = tag_IPA }
	)
end

function tests:test_phonetic_pron()
	local examples = {
        { "aldaw", "ʔal̪ˈd̪aʊ̯", "aldáw" },
        { "anyil", "ʔaˈɲil̪", "anyíl" },
        { "aso", "ˈʔa.so", "aso" },
        { "baak", "ˈbaʔ.ak", "bâak"},
        { "babaye","baˈba.je", "babaye" },
		{ "baga","ˈba.ɡaʔ", "bagà" },
		{ "baga","baˈɡaʔ", "bagâ" },
		{ "baka","ˈba.ka", "baka" },
        { "bakla","bakˈl̪aʔ", "baklâ" },
        { "banyo","ˈba.ɲo", "banyo" },
        { "bareta","baˈɾe.taʔ", "baretà" },
        { "basog", "baˈsoɡ", "basóg" },
        { "bitaog", "biˈtaʔ.oɡ", "bitâog"},
        { "Camarines Sur","ka.maˈɾi.n̪es suɾ","Camarines Sur"}, 
        { "Carlos","ˈkaɾ.l̪os","Carlos"},
		{ "daan","ˈd̪aʔ.an̪", "dâan" },
		{ "datong","d̪aˈtoŋ", "datóng" },
		{ "dila", "ˈd̪i.l̪aʔ", "dilà" }, 
		{ "diyaryo","ˈd͡ʒaɾ.jo", "diyaryo" }, 
		{ "dominggo", "d̪oˈmiŋ.ɡo", "dominggo"},
		{ "duwa", "ˈd̪wa", "duwá"},
		{ "hadok","haˈd̪ok", "hadók" },
		{ "hagok","ˈhaʔ.ɡok", "hàgok" }, 
		{ "hiwa","ˈhi.waʔ", "hiwà" },
		{ "hiwaon","hiˈwaʔ.on̪", "hiwâon" },
		{ "ina","ʔiˈn̪a", "iná" },
		{ "kabaong", "kaˈbaʔ.oŋ", "kabâong"},
		{ "katre", "ˈkat.ɾe", "katre"},
        { "lagadi","l̪aˈɡa.d̪iʔ","lagadì"}, 
		{ "lapida","ˈl̪a.pi.d̪a","lápida"},
		{ "laya","ˈl̪aʔ.ja","lâya"},
		{ "Legazpi","l̪eˈɡas.pi","Legazpi"},
        { "ligwan","l̪iɡˈwan̪","ligwán"},
        { "linog","ˈl̪i.n̪oɡ","linog"},
		{ "luob","l̪uʔˈob","lù.ób"},
		{ "luto","ˈl̪u.toʔ","lutò"},
        { "Niño","ˈn̪i.ɲo","Niño"},
        { "nganga","ˈŋa.ŋa","nganga"},
        { "pakla","pakˈl̪a", "paklá" },
        { "parakol","pa.ɾaˈkol̪", "parakól" },
        { "pinto","pin̪ˈtoʔ", "pintô" },
        { "pulo","puˈl̪oʔ", "pulô" },
	}

	self:iterate(examples, "check_phonetic_ipa")
end


return tests