Module:mr-Modi-translit/testcases

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

All tests passed. (refresh)

TextExpectedActualDiffers atComments
test_translit_marathi:
Passed𑘥𑘰𑘨𑘝bhāratbhārat
Passed𑘦𑘨𑘰𑘙𑘲marāṭhīmarāṭhī
Passed𑘮𑘵𑘟𑘧hrudayhruday

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

--TO DO
function tests:do_test_translit(modi, roman, comment)
	self:equals(
		'<span class="Modi" lang="mr">[[' .. modi .. '#Marathi|' .. modi .. ']]</span>',
		mr_translit.tr(modi, 'mr', 'Modi'),
		roman,
		{ comment = comment })
end

function tests:test_translit_marathi()
	local examples = {

	--Fundamental tests
		{ '𑘥𑘰𑘨𑘝', 'bhārat' }, 
		{ '𑘦𑘨𑘰𑘙𑘲', 'marāṭhī' }, 
		{ '𑘮𑘵𑘟𑘧', 'hruday' }, 
	}
	
	self:iterate(examples, 'do_test_translit')
end
 
return tests