Jump to content

Module:Tibt-Deva-translit/testcases

From Wiktionary, the free dictionary

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

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_deva:
Passedབྷ

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

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

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

function tests:test_translit_deva()
	local examples = {
		{ 'བྷ', 'भ' },
	}
	self:iterate(examples, 'do_test_translit')
end
 
return tests