Module:ybh-translit/testcases: Difference between revisions

From Linguifex
Jump to navigation Jump to search
Created page with "-- Unit tests for Module:ybh-translit. Refresh page to run tests. local tests = require('Module:UnitTests') local ybh_translit = require('Module:ybh-translit')-- Unit test..."
 
m 1 revision imported
 
(No difference)

Latest revision as of 12:45, 21 April 2026



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