Module:Hoo-ipac/testcases
Jump to navigation
Jump to search
2 of 8 tests failed. (refresh)
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
2 of 8 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ʁɔʁɬːɔʁ | |
| hoofnisk | hɔːfnisk⁽ᵊ⁾ | hoːfnisk⁽ᵊ⁾ |
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 .. "#Hoofnur|" .. 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ʁɔʁɬːɔʁ"},
{"hoofnisk", "hɔːfnisk⁽ᵊ⁾"},
}
self:iterate(list, "check_phonetic")
end
return tests