Module:qhv-pron/testcases: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 19: | Line 19: | ||
end | end | ||
function tests: | function tests:test_modern() | ||
local list = { | local list = { | ||
{"drakaɾys", "draˈkarys"}, | {"drakaɾys", "draˈkarys"}, | ||
Revision as of 16:48, 7 February 2021
- The following documentation is located at Module:qhv-pron/testcases/doc. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
8 of 10 tests failed. (refresh)
| Text | Expected | Actual | |
|---|---|---|---|
| drakaɾys | draˈkarys | draˈkaɾys | |
| Passed | valonqar | vaˈloɴqar | vaˈloɴqar |
| Thoros | ˈθoɾos | ˈθoros | |
| aɾakh | aˈɾax | ˈaɾax | |
| ēngos | ˈeːŋɡos | ˈeːŋgos | |
| amīvindigon | amiːˈvindiɡon | amiːˈvindigon | |
| ojehiknon | ojeˈhiknon | oɟeˈhiknon | |
| pōja | ˈpoːja | ˈpoːɟa | |
| Passed | riña | ˈriɲa | ˈriɲa |
| ziɾȳla | ziˈryːla | ziˈɾyːla |
local tests = require('Module:UnitTests')
local m_IPA = require('Module:qhv-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 linkup(text)
return "[[Contionary:" .. text .. "#High Valyrian|" .. text .. "]]"
end
function tests:check_output(term, expected)
return tests:equals(
linkup(term),
m_IPA.crux(term),
expected,
{ display = IPA_style }
)
end
function tests:test_modern()
local list = {
{"drakaɾys", "draˈkarys"},
{"valonqar", "vaˈloɴqar"},
{"Thoros", "ˈθoɾos"},
{"aɾakh", "aˈɾax"},
{"ēngos", "ˈeːŋɡos"},
{"amīvindigon", "amiːˈvindiɡon"},
{"ojehiknon", "ojeˈhiknon"},
{"pōja", "ˈpoːja"},
{"riña", "ˈriɲa"},
{"ziɾȳla", "ziˈryːla"},
}
self:iterate(list, "check_output")
end
return tests