Module:anui-pron/testcases: Difference between revisions
Jump to navigation
Jump to search
5 tests failed. (refresh)
No edit summary |
No edit summary |
||
Line 26: | Line 26: | ||
{"a̰ã", "ã̰̰ː˧"}, | {"a̰ã", "ã̰̰ː˧"}, | ||
{"a̰ʼa", "a̰̰ʔa˦"}, | {"a̰ʼa", "a̰̰ʔa˦"}, | ||
{"a̰ʼã", "ã̰̰ʔã˥˦"}, | {"a̰ʼã", "ã̰̰ʔã˥˦"}, | ||
{"ùu", "ṵː˨"}, | {"ùu", "ṵː˨"}, | ||
{"um", "m̩ː˥˦"}, | {"um", "m̩ː˥˦"}, | ||
{"ṵm", "m̰̍ː˧"}, | {"ṵm", "m̰̍ː˧"}, | ||
{"mʼm", "m̰̍ʔm̩˧"}, | {"mʼm", "m̰̍ʔm̩˧"}, | ||
{"oi", "ɔi˧"}, | {"oi", "ɔi˧"}, | ||
{"oĩ", "ɔ̃ĩ˥˦"}, | {"oĩ", "ɔ̃ĩ˥˦"}, |
Revision as of 18:33, 19 January 2022
- The following documentation is located at Module:anui-pron/testcases/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
5 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
aa | aː˧ | aː˧ | |
aã | ãː˥˦ | ãː˥˦ | |
a̰a | a̰̰ː˦ | a̰̰ː˦ | |
a̰ã | ã̰̰ː˧ | ã̰̰ː˧ | |
a̰ʼa | a̰̰ʔa˦ | a̰̰ʔa˦ | |
a̰ʼã | ã̰̰ʔã˥˦ | ã̰̰ʔã˥˦ | |
ùu | ṵː˨ | ṵː˨ | |
um | m̩ː˥˦ | m̩ː˥˦ | |
ṵm | m̰̍ː˧ | m̰̍ː˧ | |
mʼm | m̰̍ʔm̩˧ | m̰̍ʔm̩˧ | |
oi | ɔi˧ | ɔi˧ | |
oĩ | ɔ̃ĩ˥˦ | ɔ̃ĩ˥˦ | |
uĩ | m̩ĩ˥˦ | m̩ĩ˥˦ | |
ṵĩ | m̰̍ĩ˧ | m̰̍ĩ˧ | |
ḛe | ḛ̰ː˦ | ḛ̰ː˦ | |
ṭʼṭʼaṇi | ʈʼʈʼaᶯɖi | ʈʼʈʼaᶯɖi | |
šǃxa̰ʼã | ʃǃ͡χɑ̰̃ʔã˥˦ | ʃǃ͡χɑ̰̃ʔã˥˦ | |
ʘui | ʘɯi˧ | ʘɯi˧ | |
ṭrui | ʈ͡ʂɯi˧ | ʈ͡ʂɯi˧ |
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 "'''" .. x .. "'''"
end
function tests:check_output(term, expected)
return tests:equals(
bold(term),
m_IPA.crux(term),
expected,
{ display = IPA_style, show_difference = true}
)
end
function tests:test_example()
local list = {
{"aa", "aː˧"},
{"aã", "ãː˥˦"},
{"a̰a", "a̰̰ː˦"},
{"a̰ã", "ã̰̰ː˧"},
{"a̰ʼa", "a̰̰ʔa˦"},
{"a̰ʼã", "ã̰̰ʔã˥˦"},
{"ùu", "ṵː˨"},
{"um", "m̩ː˥˦"},
{"ṵm", "m̰̍ː˧"},
{"mʼm", "m̰̍ʔm̩˧"},
{"oi", "ɔi˧"},
{"oĩ", "ɔ̃ĩ˥˦"},
{"uĩ", "m̩ĩ˥˦"},
{"ṵĩ", "m̰̍ĩ˧"},
{"ḛe", "ḛ̰ː˦"},
{"ṭʼṭʼaṇi", "ʈʼʈʼaᶯɖi"},
{"šǃxa̰ʼã", "ʃǃ͡χɑ̰̃ʔã˥˦"},
{"ʘui", "ʘɯi˧"},
{"ṭrui", "ʈ͡ʂɯi˧"},
}
self:iterate(list, "check_output")
end
return tests