Jump to content

Module:srn-IPA/testcases

From Wiktionary, the free dictionary

All tests passed. (refresh)

TextExpectedActual
test_ipa:
Passedmmanˈmːanˈmːan
Passedsranansɾaˈnansɾaˈnan

local tests = require("Module:UnitTests")
local m_srn_IPA = require("Module:srn-IPA")

function tests:ipa(text, expected)
	local system = 0
	local phonemic, phonetic_a, phonetic_b = m_srn_IPA.make_IPAs(text, system)
	self:equals(text, phonemic, expected)
end

function tests:test_ipa()
	self:ipa("mman", "ˈmːan")
	self:ipa("sranan", "sɾaˈnan")
end

return tests