Module:Hoo-ipac/testcases: Difference between revisions

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..."
 
RoTM94 (talk | contribs)
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
local tests = require('Module:UnitTests')
local tests = require('Module:UnitTests')
local m_IPA = require('Module:qay-pron')
local m_IPA = require('Module:Hoo-ipac')


local function IPA_style(IPA)
local function IPA_style(IPA)
Line 7: Line 7:


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


Line 21: Line 21:
function tests:test_phonetic()
function tests:test_phonetic()
local list = {
local list = {
{"hi", "ˈhi"},
{"hi", "hi"},
{"fjåli", "fjuli"},
{"berna", "bɛʁna"},
{"svåttaa", "sʋutːaː"},
{"nåriłłår", "nuʁiɬːɔʁ"},
{"nårriłłår", "nɔʁːiɬːɔʁ"},
{"nårårłłår", "nuʁɔʁɬːɔʁ"},
{"hoofnisk", "hɔːfnisk⁽ᵊ⁾"},
}
}
self:iterate(list, "check_phonetic")
self:iterate(list, "check_phonetic")