Module:siwa-pron/testcases: Difference between revisions
Jump to navigation
Jump to search
1 of 0 tests failed. (refresh)
No edit summary |
No edit summary |
||
| Line 13: | Line 13: | ||
return tests:equals( | return tests:equals( | ||
noresp and linkup(noresp) .. "<br>(" .. term .. ")" or linkup(term), | noresp and linkup(noresp) .. "<br>(" .. term .. ")" or linkup(term), | ||
m_IPA. | m_IPA.show(term), | ||
expected, | expected, | ||
{ display = IPA_style } | { display = IPA_style } | ||
Revision as of 16:03, 6 January 2021
- The following documentation is located at Module:siwa-pron/testcases/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
1 of 0 tests failed. (refresh)
| Text | Expected | Actual | |
|---|---|---|---|
Script error during testing: Module:siwa-pron:281: attempt to call method 'getParent' (a nil value)stack traceback: Module:siwa-pron:281: in function 'show' Module:siwa-pron/testcases:15: in function 'func' Module:UnitTests:313: in function 'iterate' Module:siwa-pron/testcases:76: in function <Module:siwa-pron/testcases:21> (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> (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:siwa-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 .. "#Siwa|" .. text .. "]]"
end
function tests:check_output(term, expected, noresp)
return tests:equals(
noresp and linkup(noresp) .. "<br>(" .. term .. ")" or linkup(term),
m_IPA.show(term),
expected,
{ display = IPA_style }
)
end
function tests:test_example()
local list = {
{"kigįini", "ˈcʰijːini"},
{"gedli", "ˈɟetɬi"},
{"poaṡṡi", "ˈpʰɔɑɕːi"},
{"katsa", "ˈkʰɑt͡sa"},
{"dảdna", "ˈdæːʔt̚na"},
{"dảnaka", "ˈdæːnɑɡa"},
{"kęmes", "ˈcʰæmɛs"},
{"pilra", "ˈpʰɪlra"},
{"tygi", "ˈtʰyɟi"},
{"ymni", "ˈœmnːi"},
{"tsġiauga", "ˈt͡sxiɑuɣa"},
{"huoibmui", "ˈhʊɔɪʔp̚mui"},
{"mamma", "ˈmɑmːa"},
{"hįůdįa", "ˈhjød͡ʑa"},
{"tỏ", "ˈtʰʊː"},
{"gįosin", "ˈɟɔsɪn"},
{"gįegįi", "ˈd͡zejːi"},
{"kika", "ˈcʰika"},
{"tsepu", "ˈt͡sepu"},
{"huhhi", "ˈhuhːi"},
{"tůppů", "ˈtʰœʔpø"},
{"sauṡpỉdna", "ˈsaʊɕpiːʔt̚na"},
{"voakna", "ˈvɔaʔk̚ŋa"},
{"toḥḥami", "ˈtʰɔʔːɑmi"},
{"oddo", "ˈɔtːɔ"},
{"niḍgi", "ˈnɪðɟi"},
{"nedġi", "ˈnɛðxi"},
{"Teltsġvi", "ˈtʰɛɬt͡sxwi"},
{"uįo·kỏesġen", "ˌujɔˈk⁽ʰ⁾ʊːɛsxɛn", "uįokỏesġen"},
{"hait", "ˈhaɪʔɪ"},
{"siaun", "ˈsɪaʊn"}, --made-up word to test triphthongs in the form -C#
{"vihi", "ˈviʔi"},
--[[{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},]]
}
self:iterate(list, "check_output")
end
return tests