Module:anui-pron/testcases: Difference between revisions
Jump to navigation
Jump to search
8 tests failed. (refresh)
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
local function IPA_style(IPA) | local function IPA_style(IPA) | ||
return '<span style="font-size:110%;font-family:Gentium,\'DejaVu Sans\',\'Segoe UI\',sans-serif>' .. IPA .. '</span>' | return '<span style="font-size:110%;font-family:Gentium,\'DejaVu Sans\',\'Segoe UI\',sans-serif>' .. IPA .. '</span>' | ||
end | end | ||
function tests:check_output(term, expected) | function tests:check_output(term, expected) | ||
return tests:equals( | return tests:equals( | ||
term, | |||
m_IPA.crux(term), | m_IPA.crux(term), | ||
expected, | expected, |
Revision as of 14:56, 1 July 2021
- The following documentation is located at Module:anui-pron/testcases/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
8 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
aa | aː | aː˧ | |
aã | ãː | ãː˥˦ | |
àa | a̰ː | a̰̰ː˦ | |
àã | ã̰ː | ã̰̰ː˧ | |
àʼa | a̰ʔa | a̰̰ʔa˦ | |
àʼã | ã̰ʔã | ã̰̰ʔã˥˦ | |
um | m̍ː˥˦ | m̩ː˥˦ | |
ùm | m̰̍ː˧ | m̰̍ː˧ | |
mʼm | m̰̍ʔm˧ | m̰̍ʔm̩˧ |
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
function tests:check_output(term, expected)
return tests:equals(
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