Module:ybh-translit/testcases

Revision as of 12:45, 21 April 2026 by Sware (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:ybh-translit/testcases/doc

-- 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