Module:Hoo-ipac/testcases: Difference between revisions
Jump to navigation
Jump to search
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,\'DejaVu Sans\',\'Segoe UI\',sans-serif>' .. IPA .. '</span>' end local function link(term) return '" .. term .. '' end function tests:check_phonetic(term, expected) return tests:equals( link(term), m_IPA.crux(term), expected, { display = IPA_style, show_d..." |
No edit summary |
||
| Line 1: | Line 1: | ||
local tests = require('Module:UnitTests') | local tests = require('Module:UnitTests') | ||
local m_IPA = require('Module: | local m_IPA = require('Module:Hoo-ipac') | ||
local function IPA_style(IPA) | local function IPA_style(IPA) | ||
Revision as of 17:18, 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 1 test failed. (refresh)
| Text | Expected | Actual | |
|---|---|---|---|
| hi | ˈhi | hi |
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"},
}
self:iterate(list, "check_phonetic")
end
return tests