Module:qhv-pron/testcases: Difference between revisions
Jump to navigation
Jump to search
19 tests failed. (refresh)
No edit summary |
No edit summary |
||
Line 30: | Line 30: | ||
function tests:test_modern() | function tests:test_modern() | ||
local list = { | local list = { | ||
{"drakarys", " | {"drakarys", "dra.ˈka.ɾys"}, | ||
{"valonqar", " | {"valonqar", "va.ˈloɴ.qar"}, | ||
{"Thoros", " | {"Thoros", "ˈθo.ɾos"}, | ||
{"arakh", " | {"arakh", "a.ˈɾax"}, | ||
{"ēngos", " | {"ēngos", "ˈeːŋ.ɡos"}, | ||
{"amīvindigon", " | {"amīvindigon", "a.miː.ˈvin.di.ɡon"}, | ||
{"ojehiknon", " | {"ojehiknon", "o.je.ˈhik.non"}, | ||
{"pōja", " | {"pōja", "ˈpoː.ja"}, | ||
{"riña", " | {"riña", "ˈri.ɲa"}, | ||
{"zirȳla", " | {"zirȳla", "zi.ˈɾyː.la"}, | ||
{"ipradis", " | {"ipradis", "i.ˈpra.dis"}, | ||
} | } | ||
self:iterate(list, "check_output") | self:iterate(list, "check_output") | ||
Line 47: | Line 47: | ||
function tests:test_antique() | function tests:test_antique() | ||
local list = { | local list = { | ||
{"vējōñe", " | {"vējōñe", "veː.ˈjoː.ɲe"}, | ||
{"vōljes", " | {"vōljes", "ˈwoː.ʎes"}, | ||
{"vumbiarzy", " | {"vumbiarzy", "ˈwum.bi͜ar.zy"}, | ||
{"vȳs", "ˈɥyːs"}, | {"vȳs", "ˈɥyːs"}, | ||
{"ȳgha", " | {"ȳgha", "ˈyː.ɣa"}, | ||
{"vajie", " | {"vajie", "ˈɥa.ɟi͜e"}, | ||
{"vūjigon", " | {"vūjigon", "ˈwuː.ɟi.ɡon"}, | ||
{"qrillaodikio", " | {"qrillaodikio", "qril.ˈlao̯.di.ki͜o"}, | ||
} | } | ||
self:iterate(list, "check_output2") | self:iterate(list, "check_output2") |
Revision as of 19:40, 7 February 2021
- The following documentation is located at Module:qhv-pron/testcases/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
19 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
vējōñe | veː.ˈjoː.ɲe | veːˈjoːɲe | |
vōljes | ˈwoː.ʎes | ˈwoːʎes | |
vumbiarzy | ˈwum.bi͜ar.zy | wumˈbi͜arzy | |
vȳs | ˈɥyːs | ɥyːs | |
ȳgha | ˈyː.ɣa | ˈyːɣa | |
vajie | ˈɥa.ɟi͜e | ˈɥaɟi͜e | |
vūjigon | ˈwuː.ɟi.ɡon | ˈwuːɟiɡon | |
qrillaodikio | qril.ˈlao̯.di.ki͜o | qrilˈlao̯diki͜o |
Text | Expected | Actual | |
---|---|---|---|
drakarys | dra.ˈka.ɾys | draˈkaɾys | |
valonqar | va.ˈloɴ.qar | vaˈloɴqar | |
Thoros | ˈθo.ɾos | ˈθoɾos | |
arakh | a.ˈɾax | ˈaɾax | |
ēngos | ˈeːŋ.ɡos | ˈeːŋɡos | |
amīvindigon | a.miː.ˈvin.di.ɡon | amiːˈvindiɡon | |
ojehiknon | o.je.ˈhik.non | ojeˈhiknon | |
pōja | ˈpoː.ja | ˈpoːja | |
riña | ˈri.ɲa | ˈriɲa | |
zirȳla | zi.ˈɾyː.la | ziˈɾyːla | |
ipradis | i.ˈpra.dis | iˈpradis |
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:check_output2(term, expected)
return tests:equals(
linkup(term),
m_IPA.antique_crux(term),
expected,
{ display = IPA_style }
)
end
function tests:test_modern()
local list = {
{"drakarys", "dra.ˈka.ɾys"},
{"valonqar", "va.ˈloɴ.qar"},
{"Thoros", "ˈθo.ɾos"},
{"arakh", "a.ˈɾax"},
{"ēngos", "ˈeːŋ.ɡos"},
{"amīvindigon", "a.miː.ˈvin.di.ɡon"},
{"ojehiknon", "o.je.ˈhik.non"},
{"pōja", "ˈpoː.ja"},
{"riña", "ˈri.ɲa"},
{"zirȳla", "zi.ˈɾyː.la"},
{"ipradis", "i.ˈpra.dis"},
}
self:iterate(list, "check_output")
end
function tests:test_antique()
local list = {
{"vējōñe", "veː.ˈjoː.ɲe"},
{"vōljes", "ˈwoː.ʎes"},
{"vumbiarzy", "ˈwum.bi͜ar.zy"},
{"vȳs", "ˈɥyːs"},
{"ȳgha", "ˈyː.ɣa"},
{"vajie", "ˈɥa.ɟi͜e"},
{"vūjigon", "ˈwuː.ɟi.ɡon"},
{"qrillaodikio", "qril.ˈlao̯.di.ki͜o"},
}
self:iterate(list, "check_output2")
end
return tests