Module:btx-translit/testcases

From Wiktionary, the free dictionary
Jump to navigation Jump to search

This is the unit-testing module for Module:btx-translit.

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_btx:
Passedᯀᯂᯬ(h)aku(h)aku
Passedᯀᯝᯫᯉ᯳(h)angin(h)angin

-- Unit tests for [[Module:btx-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local btx_translit = require('Module:btx-translit')

--TO DO
function tests:do_test_translit(karo, roman, xlit)
	self:equals('<span class="Batk" lang="btx">[[' .. karo .. '#Karo|' .. karo .. ']]</span>', btx_translit.tr(karo, 'btx', 'Batk'), roman)
end

function tests:test_translit_btx()
	self:do_test_translit('ᯀᯂᯬ', '(h)aku')
	self:do_test_translit('ᯀᯝᯫᯉ᯳', '(h)angin')
end
 
return tests