Module:qay-pron/testcases: Difference between revisions
Jump to navigation
Jump to search
2 tests failed. (refresh)
(Created page with "local tests = require('Module:UnitTests') local m_IPA = require('Module:qay-pron') local function IPA_style(IPA) return '<span style="font-size:110%;font-family:Gentium,\'De...") |
No edit summary |
||
Line 30: | Line 30: | ||
function tests:test_phonemic() | function tests:test_phonemic() | ||
local list = { | local list = { | ||
{"ankyu", ""}, | {"ankyu", "ˈaŋ.kju"}, | ||
{"netujas", ""}, | {"netujas", "neˈtu.ʤas"}, | ||
{"nivajya", ""}, | {"nivajya", "niˈva.ʤja"}, | ||
{"maviyēri", ""}, | {"maviyēri", "ma.viˈjeː.ri"}, | ||
{"tahi", ""}, | {"tahi", "ˈta.hi"}, | ||
{"baho", ""}, | {"baho", "ˈba.ho"}, | ||
{"tavvāng", ""}, | {"tavvāng", "taˈvaːŋ"}, | ||
{"disyyang", ""}, | {"disyyang", "diˈsjaŋ"}, | ||
{"tipuyya", ""}, | {"tipuyya", "tiˈpu.ja"}, | ||
{"ming", ""}, | {"ming", "miŋ"}, | ||
{"enya", ""}, | {"enya", "ˈen.ja"}, | ||
{"agon", ""}, | {"agon", "ˈa.ɡon"}, | ||
{"pakur", ""}, | {"pakur", "ˈpa.kur"}, | ||
{"mine", ""}, | {"mine", "ˈmi.ne"}, | ||
{"huākaya", ""}, | {"huākaya", "ˈuaː.ka.ja"}, | ||
{"adauyi", ""}, | {"adauyi", "aˈdau.ji"}, | ||
{"edauyi", ""}, | {"edauyi", "eˈdau.ji"}, | ||
{"nekuyi", ""}, | {"nekuyi", "ˈne.ku.ji"}, | ||
{"minguay", ""}, | {"minguay", "miŋˈɡuaj"}, | ||
{"linktang", ""}, | {"linktang", "liŋkˈtaŋ"}, | ||
{"silvnang", ""}, | {"silvnang", "silvˈnaŋ"}, | ||
{"migryo", ""}, | {"migryo", "ˈmi.ɡrjo"}, | ||
{"subrjo", ""}, | {"subrjo", "ˈsu.brjo"}, | ||
{"ay", ""}, | {"ay", "aɪ"}, | ||
} | } | ||
self:iterate(list, "check_phonemic") | self:iterate(list, "check_phonemic") | ||
Line 60: | Line 60: | ||
function tests:test_phonetic() | function tests:test_phonetic() | ||
local list = { | local list = { | ||
{"ankyu", ""}, | {"ankyu", "ˈäŋ.kju"}, | ||
{"netujas", ""}, | {"netujas", "neˈtu.ʤäs"}, | ||
{"nivajya", ""}, | {"nivajya", "niˈva.ʤjä"}, | ||
{"maviyēri", ""}, | {"maviyēri", "mäviˈjeː.ɾi"}, | ||
{"tahi", ""}, | {"tahi", "ˈtä.çi"}, | ||
{"baho", ""}, | {"baho", "ˈbä.xo"}, | ||
{"tavvāng", ""}, | {"tavvāng", "täˈväːŋ"}, | ||
{"disyyang", ""}, | {"disyyang", "dɪsˈjäŋ"}, | ||
{"tipuyya", ""}, | {"tipuyya", "tiˈpʊ.jä"}, | ||
{"ming", ""}, | {"ming", "mɪŋ"}, | ||
{"enya", ""}, | {"enya", "ˈɛn.jä"}, | ||
{"agon", ""}, | {"agon", "ˈä.ɡɔn"}, | ||
{"pakur", ""}, | {"pakur", "ˈpä.kʊɾ"}, | ||
{"mine", ""}, | {"mine", "ˈmi.nə"}, | ||
{"huākaya", ""}, | {"huākaya", "ˈwäː.kä.jä"}, | ||
{"adauyi", ""}, | {"adauyi", "äˈdä.wi"}, | ||
{"edauyi", ""}, | {"edauyi", "eˈdä.wi"}, | ||
{"nekuyi", ""}, | {"nekuyi", "ˈne.kwi"}, | ||
{"minguay", ""}, | {"minguay", "mɪŋˈɡwäɪ"}, | ||
{"linktang", ""}, | {"linktang", "liŋkˈtäŋ"}, | ||
{"silvnang", ""}, | {"silvnang", "sɪlvˈnäŋ"}, | ||
{"migryo", ""}, | {"migryo", "ˈmi.ɡɾjo"}, | ||
{"subrjo", ""}, | {"subrjo", "ˈsu.bɾjo"}, | ||
{"ay", ""}, | {"ay", "aɪ"}, | ||
} | } | ||
self:iterate(list, "check_phonetic") | self:iterate(list, "check_phonetic") |
Revision as of 12:33, 24 June 2022
- The following documentation is located at Module:qay-pron/testcases/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
2 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:qay-pron/testcases:15: attempt to call field 'phonemic' (a nil value)stack traceback: Module:qay-pron/testcases:15: in function 'func' Module:UnitTests:247: in function 'iterate' Module:qay-pron/testcases:57: in function <Module:qay-pron/testcases:30> (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]: ? |
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:qay-pron/testcases:24: attempt to call field 'phonetic' (a nil value)stack traceback: Module:qay-pron/testcases:24: in function 'func' Module:UnitTests:247: in function 'iterate' Module:qay-pron/testcases:87: in function <Module:qay-pron/testcases:60> (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:qay-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 link(term)
return '[[Contionary:' .. term .. "#Ayeri|" .. term .. ']]'
end
function tests:check_phonemic(term, expected)
return tests:equals(
link(term),
m_IPA.phonemic(term),
expected,
{ display = IPA_style, show_difference = true}
)
end
function tests:check_phonetic(term, expected)
return tests:equals(
link(term),
m_IPA.phonetic(term),
expected,
{ display = IPA_style, show_difference = true}
)
end
function tests:test_phonemic()
local list = {
{"ankyu", "ˈaŋ.kju"},
{"netujas", "neˈtu.ʤas"},
{"nivajya", "niˈva.ʤja"},
{"maviyēri", "ma.viˈjeː.ri"},
{"tahi", "ˈta.hi"},
{"baho", "ˈba.ho"},
{"tavvāng", "taˈvaːŋ"},
{"disyyang", "diˈsjaŋ"},
{"tipuyya", "tiˈpu.ja"},
{"ming", "miŋ"},
{"enya", "ˈen.ja"},
{"agon", "ˈa.ɡon"},
{"pakur", "ˈpa.kur"},
{"mine", "ˈmi.ne"},
{"huākaya", "ˈuaː.ka.ja"},
{"adauyi", "aˈdau.ji"},
{"edauyi", "eˈdau.ji"},
{"nekuyi", "ˈne.ku.ji"},
{"minguay", "miŋˈɡuaj"},
{"linktang", "liŋkˈtaŋ"},
{"silvnang", "silvˈnaŋ"},
{"migryo", "ˈmi.ɡrjo"},
{"subrjo", "ˈsu.brjo"},
{"ay", "aɪ"},
}
self:iterate(list, "check_phonemic")
end
function tests:test_phonetic()
local list = {
{"ankyu", "ˈäŋ.kju"},
{"netujas", "neˈtu.ʤäs"},
{"nivajya", "niˈva.ʤjä"},
{"maviyēri", "mäviˈjeː.ɾi"},
{"tahi", "ˈtä.çi"},
{"baho", "ˈbä.xo"},
{"tavvāng", "täˈväːŋ"},
{"disyyang", "dɪsˈjäŋ"},
{"tipuyya", "tiˈpʊ.jä"},
{"ming", "mɪŋ"},
{"enya", "ˈɛn.jä"},
{"agon", "ˈä.ɡɔn"},
{"pakur", "ˈpä.kʊɾ"},
{"mine", "ˈmi.nə"},
{"huākaya", "ˈwäː.kä.jä"},
{"adauyi", "äˈdä.wi"},
{"edauyi", "eˈdä.wi"},
{"nekuyi", "ˈne.kwi"},
{"minguay", "mɪŋˈɡwäɪ"},
{"linktang", "liŋkˈtäŋ"},
{"silvnang", "sɪlvˈnäŋ"},
{"migryo", "ˈmi.ɡɾjo"},
{"subrjo", "ˈsu.bɾjo"},
{"ay", "aɪ"},
}
self:iterate(list, "check_phonetic")
end
return tests