Module:ybi-translit/testcases

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

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

All tests passed. (refresh)

TextExpectedActualDiffers atComments
test_translit_yamphu:
Passedलेॽआप्मे़le'āpmêle'āpmê
Passedअसे़ॽए़asê'êasê'ê

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

function tests:do_test_translit(deva, roman, comment)
	self:equals('<span class="Deva" lang="ybi">[[' .. mw.ustring.gsub(deva, "%+", "") .. '#Yamphu|' .. mw.ustring.gsub(deva, "%+", "") .. ']]</span>', ybi_translit.tr(deva, 'ybi', 'Deva'), roman, { comment = comment })
end

function tests:test_translit_yamphu()
	self:do_test_translit('लेॽआप्मे़', "le'āpmê")
	self:do_test_translit('असे़ॽए़', "asê'ê")
end
 
return tests