Module:qhv-pron/testcases: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
end | end | ||
local function linkup(text) | local function linkup(text, noresp) | ||
return "[[Contionary:" .. text .. "#High Valyrian|" .. text .. "]]" | return "[[Contionary:" .. text .. "#High Valyrian|" .. text .. "]]" | ||
end | end | ||
function tests:check_output(term, expected) | function tests:check_output(term, expected, noresp) | ||
return tests:equals( | return tests:equals( | ||
linkup(term), | noresp and linkup(noresp) .. "<br>(" .. term .. ")" or linkup(term), | ||
m_IPA.crux(term), | m_IPA.crux(term), | ||
expected, | expected, | ||
| Line 33: | Line 33: | ||
{"valonqar", "vaˈloɴqar"}, | {"valonqar", "vaˈloɴqar"}, | ||
{"Thoros", "ˈθoɾos"}, | {"Thoros", "ˈθoɾos"}, | ||
{" | {"arákh", "aˈɾáx", "arakh"}, | ||
{"ēngos", "ˈeːŋɡos"}, | {"ēngos", "ˈeːŋɡos"}, | ||
{"amīvindigon", "amiːˈvindiɡon"}, | {"amīvindigon", "amiːˈvindiɡon"}, | ||
| Line 50: | Line 50: | ||
{"vējōñe", "veːˈjoːɲe"}, | {"vējōñe", "veːˈjoːɲe"}, | ||
{"vōljes", "ˈwoːʎes"}, | {"vōljes", "ˈwoːʎes"}, | ||
{"vumbiarzy", " | {"vumbiarzy", "wumˈbi͜arzy"}, | ||
{"vȳs", " | {"vȳs", "ɥyːs"}, | ||
{"ȳgha", "ˈyːɣa"}, | {"ȳgha", "ˈyːɣa"}, | ||
{"vajie", "ˈɥaɟi͜e"}, | {"vajie", "ˈɥaɟi͜e"}, | ||
Latest revision as of 14:55, 1 July 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
10 of 12 tests failed. (refresh)
| Text | Expected | Actual | |
|---|---|---|---|
Script error during testing: Module:qhv-pron/testcases:24: attempt to call field 'antique_crux' (a nil value)stack traceback: [C]: in function 'antique_crux' Module:qhv-pron/testcases:24: in function 'func' Module:UnitTests:313: in function 'iterate' Module:qhv-pron/testcases:59: in function <Module:qhv-pron/testcases:48> (tail call): ? (tail call): ? [C]: in function 'xpcall' Module:fun/xpcall:37: in function 'xpcall' Module:UnitTests:389: in function <Module:UnitTests:350> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function <mw.lua:307> (tail call): ? (tail call): ? Module:documentation:1128: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? | |||
| Text | Expected | Actual | |
|---|---|---|---|
| drakarys | draˈkaɾys | draˈkarys | |
| valonqar | vaˈloɴqar | vaˈloɴqar | |
| Error creating thumbnail: | Thoros | ˈθoɾos | ˈθoros |
| Error creating thumbnail: | arakh (arákh) | aˈɾáx | aˈráx |
| Error creating thumbnail: | ēngos | ˈeːŋɡos | ˈeːŋgos |
| Error creating thumbnail: | amīvindigon | amiːˈvindiɡon | amiːˈvindigon |
| Error creating thumbnail: | ojehiknon | ojeˈhiknon | oɟeˈhiknon |
| Error creating thumbnail: | pōja | ˈpoːja | ˈpoːɟa |
| riña | ˈriɲa | ˈriɲa | |
| Error creating thumbnail: | zirȳla | ziˈɾyːla | ziˈryːla |
| ipradis | iˈpradis | iˈpradis | |
| Error creating thumbnail: | rholagon | ṛoˈlaɡon | ṛoˈlagon |
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, noresp)
return "[[Contionary:" .. text .. "#High Valyrian|" .. text .. "]]"
end
function tests:check_output(term, expected, noresp)
return tests:equals(
noresp and linkup(noresp) .. "<br>(" .. term .. ")" or 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"},
{"arákh", "aˈɾáx", "arakh"},
{"ēngos", "ˈeːŋɡos"},
{"amīvindigon", "amiːˈvindiɡon"},
{"ojehiknon", "ojeˈhiknon"},
{"pōja", "ˈpoːja"},
{"riña", "ˈriɲa"},
{"zirȳla", "ziˈɾyːla"},
{"ipradis", "iˈpradis"},
{"rholagon", "ṛoˈlaɡon"},
}
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͜arzy"},
{"vȳs", "ɥyːs"},
{"ȳgha", "ˈyːɣa"},
{"vajie", "ˈɥaɟi͜e"},
{"vūjigon", "ˈwuːɟiɡon"},
{"qrillaodikio", "qrilˈlao̯diki͜o"},
}
self:iterate(list, "check_output2")
end
return tests