Module:ybh-translit/testcases

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

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

All tests passed. (refresh)

TextExpectedActualDiffers atComments
test_translit_yakkha:
Passedछिम्योकchimyokachimyoka

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

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

function tests:test_translit_yakkha()
	self:do_test_translit('छिम्योक', "chimyoka")
end
 
return tests