Module:Tirh-Deva-translit/testcases

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

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

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_deva:
Passed𑒂𑒨𑒺आयॆआयॆ

-- Unit tests for [[Module:Tirh-Deva-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local transliterate = require('Module:Tirh-Deva-translit').tr

local function tag(text)
	return '<span class="Deva" lang="mai">' .. text .. '</span>'
end

local options = { display = tag }
--TO DO
function tests:do_test_translit(tirh, deva, xlit)
	self:equals('<span class="Tirh" lang="mai">[[' .. tirh .. '#Maithili|' .. tirh .. ']]</span>',
		transliterate(tirh, 'deva', 'Tirh'),
		deva,
		options)
end

function tests:test_translit_deva()
	local examples = {
		{ '𑒂𑒨𑒺', 'आयॆ' },
	}
	self:iterate(examples, 'do_test_translit')
end
 
return tests