Jump to content

Module:Deva-Tibt-translit/testcases

From Wiktionary, the free dictionary

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

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_tibetan:
Passedख्योरोཁྱོརོཁྱོརོ

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

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

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

function tests:test_translit_tibetan()
	local examples = {
		{ 'ख्योरो', 'ཁྱོརོ' },

	}
	self:iterate(examples, 'do_test_translit')
end
 
return tests