Module:anui-pron/testcases
- The following documentation is located at Module:anui-pron/testcases/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
1 test failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:anui-pron/testcases:9: attempt to concatenate global 'term' (a nil value)stack traceback: Module:anui-pron/testcases:9: in function 'bold' Module:anui-pron/testcases:14: in function 'func' Module:UnitTests:247: in function 'iterate' Module:anui-pron/testcases:33: in function <Module:anui-pron/testcases:21> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:299: in function <Module:UnitTests:261> (tail call): ? mw.lua:527: in function <mw.lua:507> (tail call): ? [C]: in function 'xpcall' ...cribunto/includes/engines/LuaStandalone/MWServer.lua:99: in function 'handleCall' ...cribunto/includes/engines/LuaStandalone/MWServer.lua:313: in function 'dispatch' ...cribunto/includes/engines/LuaStandalone/MWServer.lua:52: in function 'execute' ...Scribunto/includes/engines/LuaStandalone/mw_main.lua:7: in main chunk [C]: ? |
local tests = require('Module:UnitTests')
local m_IPA = require('Module:anui-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 bold(x)
return "'''" .. term .. "'''"
end
function tests:check_output(term, expected)
return tests:equals(
bold(term),
m_IPA.crux(term),
expected,
{ display = IPA_style }
)
end
function tests:test_example()
local list = {
{"aa", "aː"},
{"aã", "ãː"},
{"àa", "a̰ː"},
{"àã", "ã̰ː"},
{"àʼa", "a̰ʔa"},
{"àʼã", "ã̰ʔã"},
{"um", "m̍ː˥˦"},
{"ùm", "m̰̍ː˧"},
{"mʼm", "m̰̍ʔm˧"},
}
self:iterate(list, "check_output")
end
return tests