Jump to content

Module:ky-IPA/testcases

From Wiktionary, the free dictionary

All tests passed. (refresh)

TextExpectedActual
test_pron:
Passedтаенеtɑjenetɑjene
PassedЕнисейjenisejjenisej
Passedкыргызqɯrʁɯzqɯrʁɯz

local tests = require("Module:UnitTests")
local m_ky_ipa = require("Module:ky-IPA")

function tests:check_phonetic(word, expected, respelling)
	self:equals(
		"[[" .. word .. "#Kyrgyz|" .. word .. "]]",
		m_ky_ipa.phonetic(respelling or word),
		expected,
		{ display = tag_IPA }
	)
end

function tests:test_pron()
	local examples = {
		{ "таене", "tɑjene" },
		{ "Енисей", "jenisej" },
		{ "кыргыз", "qɯrʁɯz" },

	}
	self:iterate(examples, "check_phonetic")
end

return tests