Module:alu-IPA/testcases

From Wiktionary, the free dictionary
Jump to navigation Jump to search

All tests passed. (refresh)

TextExpectedActual
test_ipa:
Passed'a'e/ʔaʔe//ʔaʔe/
Passedpaak/paːk//paːk/
Passedko'ako'ara/koʔakoʔaɾa//koʔakoʔaɾa/
Passedpupuruhi'a/pupuɾuhiʔa//pupuɾuhiʔa/
Passedsiri/siɾi//siɾi/
Passed'eno/ʔeno//ʔeno/
Passed'a'e/ʔaʔe//ʔaʔe/
Passedkapaa/kapaː//kapaː/

local tests = require('Module:UnitTests')
local m_alu_ipa = require('Module:alu-IPA')

function tests:ipa(text, expected)
	local args = text
	local get_out = {args, text}
	local out = m_alu_ipa.show(get_out, true)
	self:equals(text, out[1], expected)
end

function tests:test_ipa() 
	self:ipa('\'a\'e', '/ʔaʔe/')
	self:ipa('paak', '/paːk/')
	self:ipa('ko\'ako\'ara', '/koʔakoʔaɾa/')
	self:ipa('pupuruhi\'a', '/pupuɾuhiʔa/')
	self:ipa('siri', '/siɾi/')
	self:ipa('\'eno', '/ʔeno/')
	self:ipa('\'a\'e', '/ʔaʔe/')
	self:ipa('kapaa', '/kapaː/')
end

return tests