Module:User:AmazingJus/so/testcases

local tests = require('Module:UnitTests') local m_IPA = require('Module:User:AmazingJus/so')

local function tag_IPA(IPA) return ' ' .. IPA .. ' ' end

function tests:check_output(term, expected, link) return tests:equals(		link and m_IPA.link(term) .. " (respelled " .. m_IPA.tag_text(link) .. ")" or m_IPA.link(term),		m_IPA.toIPA(term),		expected,		{ display = tag_IPA }	) end

function tests:test_pron local list = { {"inán", "inǽn" }, {"ínan", "ínæn" }, {"geedka", "FIXME" } }	self:iterate(list, "check_output") end

--			Additions take this form –		{ "entry name", "IPA" },		{ "", "" },			or, if you are generating IPA from a respelling of the term –		{ "respelling", "IPA", "entry name" }		{ "", "", "" },			Make sure to include the comma, or the module will return an error. --

return tests