Module:Hoo-ipac/testcases: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 26: | Line 26: | ||
{"svåttaa", "sʋutːaː"}, | {"svåttaa", "sʋutːaː"}, | ||
{"nåriłłår", "nuʁiɬːɔʁ"}, | {"nåriłłår", "nuʁiɬːɔʁ"}, | ||
{"nårriłłår", "nɔʁːiɬːɔʁ"}, | |||
{"nårårłłår", "nuʁɔʁɬːɔʁ"}, | |||
} | } | ||
self:iterate(list, "check_phonetic") | self:iterate(list, "check_phonetic") | ||
Revision as of 17:46, 2 September 2025
This is a test case page of the code turning words from Hoofnur into their IPA transcription. This is based off of similar modules and pages from User:Sware.
The module is still a work in progress.
- The following documentation is located at Module:Hoo-ipac/testcases/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
1 of 7 tests failed. (refresh)
| Text | Expected | Actual | |
|---|---|---|---|
| hi | hi | hi | |
| fjåli | fjuli | fjuli | |
| berna | bɛʁna | bɛʁna | |
| svåttaa | sʋutːaː | sʋutːɑː | |
| nåriłłår | nuʁiɬːɔʁ | nuʁiɬːɔʁ | |
| nårriłłår | nɔʁːiɬːɔʁ | nɔʁːiɬːɔʁ | |
| nårårłłår | nuʁɔʁɬːɔʁ | nuʁɔʁɬːɔʁ |
local tests = require('Module:UnitTests')
local m_IPA = require('Module:Hoo-ipac')
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_phonetic(term, expected)
return tests:equals(
link(term),
m_IPA.crux(term),
expected,
{ display = IPA_style, show_difference = true}
)
end
function tests:test_phonetic()
local list = {
{"hi", "hi"},
{"fjåli", "fjuli"},
{"berna", "bɛʁna"},
{"svåttaa", "sʋutːaː"},
{"nåriłłår", "nuʁiɬːɔʁ"},
{"nårriłłår", "nɔʁːiɬːɔʁ"},
{"nårårłłår", "nuʁɔʁɬːɔʁ"},
}
self:iterate(list, "check_phonetic")
end
return tests