Module:Hoo-ipac/testcases

Revision as of 16:45, 2 September 2025 by RoTM94 (talk | contribs) (Created page with "local tests = require('Module:UnitTests') local m_IPA = require('Module:qay-pron') local function IPA_style(IPA) return '<span style="font-size:110%;font-family:Gentium,\'DejaVu Sans\',\'Segoe UI\',sans-serif>' .. IPA .. '</span>' end local function link(term) return '" .. term .. '' end function tests:check_phonetic(term, expected) return tests:equals( link(term), m_IPA.crux(term), expected, { display = IPA_style, show_d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is a test case page of the code turning words from Hoofnur into their IPA transcription. This is based off of similar modules and pages from User:Sware.

The module is still a work in progress.


1 of 1 test failed. (refresh)

TextExpectedActual
test_phonetic:
Failedhiˈhiçi

local tests = require('Module:UnitTests')
local m_IPA = require('Module:qay-pron')

local function IPA_style(IPA)
	return '<span style="font-size:110%;font-family:Gentium,\'DejaVu Sans\',\'Segoe UI\',sans-serif>' .. IPA .. '</span>'
end

local function link(term)
	return '[[Contionary:' .. term .. "#Ayeri|" .. term	.. ']]'
end

function tests:check_phonetic(term, expected)
	return tests:equals(
		link(term),
		m_IPA.crux(term),
		expected,
		{ display = IPA_style, show_difference = true}
	)
end

function tests:test_phonetic()
	local list = {
		{"hi", "ˈhi"},
	}
	self:iterate(list, "check_phonetic")
end

return tests