Module:cu-pronunciation/sandbox/testcases
Jump to navigation
Jump to search
- This module sandbox lacks a documentation subpage. Please create it.
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox of (diff)
local tests = require('Module:UnitTests')
local m_IPA = require('Module:cu-pronunciation/sandbox')
local OCS = require('Module:languages').getByCode("cu")
local Cyrillic = require('Module:scripts').getByCode("Cyrl")
local function link(term)
return require("Module:links").full_link{ term = term, lang = OCS, sc = Cyrillic}
end
local function tag_IPA(IPA)
return '<span class="IPA">' .. IPA .. '</span>'
end
function tests:check_output(term, expected)
tests:equals(
term,
expected,
m_IPA.toIPA(term),
{ display = tag_IPA }
)
end
function tests:test_all()
list = {
{ "сло̏во", "s̪ɫ̪ɔ̟˦vɔ̟˨"},
{ "дальчьнъ", "dalɪt͡ʃɪnʊ̆"},
{ "йгрь", "jɪgrɪ"},
{ "ѿкаꙁъ", "ɔtʊ̆kazʊ̆"},
{ "югъ", "juɡʊ"},
{ "мєждоу", "mɛʒdu"},
{ "съчѧстьнъ", "sʊ̆t͡ʃɛ̃stɪnʊ̆"}
}
self:iterate(list, "check_output")
end
return tests