Module:tl-translit/testcases
Appearance
- The following documentation is located at Module:tl-translit/testcases/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
This is the unit-testing module for Module:tl-translit.
All tests passed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
ᜀᜋ | ama | ama | |
ᜇᜒᜏ | diwa | diwa | |
ᜇᜓᜄᜓ | dugu | dugu | |
ᜐᜎ | sala | sala | |
ᜉᜀ | paa | paa | |
ᜅᜎᜈ᜔ | ngalan | ngalan | |
ᜎᜑᜆ᜔ | lahat | lahat | |
ᜐᜇᜒᜏ | sariwa | sariwa | |
ᜉᜄ᜔ᜁᜊᜒᜄ᜔ | pag-ibig | pag-ibig | |
ᜐᜋ ᜈᜅ᜔ ᜎᜓᜂᜊ᜔ | sama nang luub | sama nang luub |
-- Unit tests for [[Module:tl-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local tl_translit = require('Module:tl-translit')
--TO DO
function tests:do_test_translit(tgl, roman, xlit)
self:equals('<span class="Tglg" lang="tl">[[' .. tgl .. '#Tagalog|' .. tgl .. ']]</span>', tl_translit.tr(tgl, 'tl', 'Tglg'), roman)
end
function tests:test_translit_tagalog()
self:do_test_translit('ᜀᜋ', 'ama')
self:do_test_translit('ᜇᜒᜏ', 'diwa')
self:do_test_translit('ᜇᜓᜄᜓ', 'dugu')
self:do_test_translit('ᜐᜎ', 'sala')
self:do_test_translit('ᜉᜀ', 'paa')
self:do_test_translit('ᜅᜎᜈ᜔', 'ngalan')
self:do_test_translit('ᜎᜑᜆ᜔', 'lahat')
self:do_test_translit('ᜐᜇᜒᜏ', 'sariwa')
self:do_test_translit('ᜉᜄ᜔ᜁᜊᜒᜄ᜔', 'pag-ibig')
self:do_test_translit('ᜐᜋ ᜈᜅ᜔ ᜎᜓᜂᜊ᜔', 'sama nang luub')
end
return tests