Jump to content

Module:IPA/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Erutuon (talk | contribs) at 20:50, 21 June 2017 (fixed). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Example Unit tests for [[Module:IPA]]. Click talk page to run tests.
local p = require("Module:UnitTests")

function p:compare(input)
    self:preprocess_equals("{{IPA/sandbox|" .. input .. "}}", mw.getCurrentFrame():preprocess("{{IPA|" .. input .. "}}"), { nowiki = true } )
end

function p:test_IPA()
	local examples = {
		"gɛt",
		"ðɪs",
	}
	
	for i, example in pairs(examples) do
		p:compare(example)
	end
end

return p