Jump to content

Module:bho-Kthi-translit/testcases

From Wiktionary, the free dictionary

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

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_bho:
Passed𑂪𑂱𑂁𑂏𑂰𑂢𑂳𑂣𑂰𑂞liṅgānupātliṅgānupāt
Passed𑂃𑂪𑂏alagalag
Passed𑂄𑂧āmām
Passed𑂌𑂮𑂞ausatausat
Passed𑂮𑂳𑂏𑂹𑂏𑂰suggāsuggā
Passed𑂮𑂳𑂏𑂢𑂰sugnāsugnā
Passed𑂍𑂒𑂩𑂮kacraskacras
Passed𑂍𑂗𑂯𑂩kaṭharkaṭhar
Passed𑂦𑂰𑂣bhāpbhāp
Passed𑂍𑂆𑂪kaīlkaīl
Passed𑂍𑂗kaṭkaṭ
Passed𑂬𑂹𑂩𑂲𑂣*𑂞𑂱śrīpatiśrīpati

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