Module:bho-Kthi-translit/testcases

Revision as of 13:38, 6 September 2024 by wikt>Kutchkutch
(diff) โ† Older revisionย | Latest revision (diff)ย | Newer revision โ†’ (diff)

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

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

--TO DO
function tests:do_test_translit(bho, roman, xlit)
	self:equals('<span class="bho-Kthi" lang="bho">[[' .. bho .. '#bho-Kthi|' .. bho .. ']]</span>', bho_translit.tr(bho, 'bho', 'bho-Kthi'), roman)
end

function tests:test_translit_bho()
	local examples = {
		{ '๐‘‚ช๐‘‚ฑ๐‘‚๐‘‚๐‘‚ฐ๐‘‚ข๐‘‚ณ๐‘‚ฃ๐‘‚ฐ๐‘‚ž', 'liแน…gฤnupฤt' },
		{ '๐‘‚ƒ๐‘‚ช๐‘‚', 'alag' },
		{ '๐‘‚„๐‘‚ง', 'ฤm' },
		{ '๐‘‚Œ๐‘‚ฎ๐‘‚ž', 'ausat'},
		{ '๐‘‚ฎ๐‘‚ณ๐‘‚๐‘‚น๐‘‚๐‘‚ฐ', 'suggฤ' },
		{ '๐‘‚ฎ๐‘‚ณ๐‘‚๐‘‚ข๐‘‚ฐ', 'sugnฤ' },
		{ '๐‘‚๐‘‚’๐‘‚ฉ๐‘‚ฎ', 'kacras' },
		{ '๐‘‚๐‘‚—๐‘‚ฏ๐‘‚ฉ', 'kaแนญhar' },
		{ '๐‘‚ฆ๐‘‚ฐ๐‘‚ฃ', 'bhฤp' },
		{'๐‘‚๐‘‚†๐‘‚ช', 'kaฤซl'},
		{'๐‘‚๐‘‚—', 'kaแนญ'},
		{'๐‘‚ฌ๐‘‚น๐‘‚ฉ๐‘‚ฒ๐‘‚ฃ*๐‘‚ž๐‘‚ฑ', 'ล›rฤซpati'},
	}
	self:iterate(examples, 'do_test_translit')
end
 
return tests