Module:si-IPA/testcases
පෙනුම
- පහත දැක්වෙන උපදෙස්, Module:si-IPA/testcases/documentation හි පිහිටා ඇත. Module:si-IPA/testcases/documentation]]. [සංස්කරණය] Categories were auto-generated by Module:module categorization. [edit]
- ප්රයෝජනවත් සබැඳි: root page • root page’s subpages • සබැඳි • transclusions • tested module • sandbox
4 of 4 tests failed. (refresh)
| Text | Expected | Actual | Comments | |
|---|---|---|---|---|
| කරනවා | kərənəwa | kərən̪əʋaː | ||
| ශ්රී ලංකා | ʃriː ləŋkaː | ʃə.riː ləm̃kaː | ||
| සිංහල | siŋhələ | sim̃hələ | ||
| සංස්කෘත | səŋskrutə | səm̃sə.krut̪ə |
local tests = require("Module:UnitTests")
local m_IPA = require("Module:si-IPA")
local function tag_IPA(IPA)
return '<span class="IPA">' .. IPA .. '</span>'
end
function tests:check_output(term, expected, comment)
self:equals(
m_IPA.link(term),
tag_IPA(m_IPA.to_IPA(term)[1]),
tag_IPA(expected),
{ comment = comment }
)
end
function tests:test_all()
examples = {
{ "කරනවා", "kərənəwa"},
{ "ශ්රී ලංකා", "ʃriː ləŋkaː"},
{ "සිංහල", "siŋhələ"},
{ "සංස්කෘත", "səŋskrutə"},
}
--[[ Copy the following to add more examples:
{ "", "" },
]]
tests:iterate(examples, "check_output")
end
return tests