Module:siwa-pron/testcases: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 4: Line 4:
local function IPA_style(IPA)
local function IPA_style(IPA)
return '<span style="font-size:110%;font-family:Gentium,\'DejaVu Sans\',\'Segoe UI\',sans-serif>' .. IPA .. '</span>'
return '<span style="font-size:110%;font-family:Gentium,\'DejaVu Sans\',\'Segoe UI\',sans-serif>' .. IPA .. '</span>'
end
function termlink(word)
return "[[Contionary:" .. word .. "#Siwa|" .. word .. "]]"
end
end


function tests:check_output(term, expected, noresp)
function tests:check_output(term, expected, noresp)
return tests:equals(
return tests:equals(
noresp and termlink(term) "(" .. noresp .. ")" or termlink(noresp),
noresp and "[[Contionary:" .. term .. "#Siwa|" .. term .. "]] (" .. noresp .. ")" or "[[Contionary:" .. noresp .. "#Siwa|" .. noresp .. "]]",
m_IPA.crux(term),
m_IPA.crux(term),
expected,
expected,