Jump to content

Module:Modi-translit/testcases

From Wiktionary, the free dictionary

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

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_modi:
Passed𑘟𑘹𑘪𑘻devodevo
Passed𑘤𑘲𑘕bījabīja
Passed𑘤𑘲𑘕𑘰𑘽bījāṃbījāṃ
Passed𑘤𑘲𑘕𑘹𑘽bījeṃbījeṃ
Passed𑘠𑘳𑘽dhuṃdhuṃ
Passed𑘥𑘰𑘽𑘤𑘰bhāṃbābhāṃbā
Passed𑘁𑘮āhaāha
Passed𑘦𑘼maumau
Passed𑘡𑘚𑘜𑘹naḍaṇenaḍaṇe
Passed𑘕𑘿𑘗𑘰𑘡𑘹𑘫𑘿𑘪𑘨jñāneśvarajñāneśvara
Passed𑘥𑘿𑘨𑘳𑘩𑘝𑘰𑘽 𑘦𑘰𑘐𑘱𑘩𑘲𑘎𑘚𑘹𑙁 𑘦𑘎𑘰𑘨𑘰𑘓𑘹𑘽𑘓𑘱 𑘁𑘽𑘐 𑘡𑘚𑘹𑙁bhrulatāṃ māgilīkaḍe. makārāceṃci āṃga naḍe.bhrulatāṃ māgilīkaḍe. makārāceṃci āṃga naḍe.
Passed𑘨𑘽𑘥𑘰raṃbhāraṃbhā

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

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

function tests:test_translit_modi()
	local examples = {
		{ '𑘟𑘹𑘪𑘻', 'devo' },
		{ '𑘤𑘲𑘕', 'bīja' },
		{ '𑘤𑘲𑘕𑘰𑘽', 'bījāṃ' },
		{ '𑘤𑘲𑘕𑘹𑘽', 'bījeṃ'},
		{ '𑘠𑘳𑘽', 'dhuṃ' },
		{ '𑘥𑘰𑘽𑘤𑘰', 'bhāṃbā' },
		{ '𑘁𑘮', 'āha' },
		{ '𑘦𑘼', 'mau' },
		{ '𑘡𑘚𑘜𑘹', 'naḍaṇe' },
		{ '𑘕𑘿𑘗𑘰𑘡𑘹𑘫𑘿𑘪𑘨', 'jñāneśvara' },
		{ '𑘥𑘿𑘨𑘳𑘩𑘝𑘰𑘽 𑘦𑘰𑘐𑘱𑘩𑘲𑘎𑘚𑘹𑙁 𑘦𑘎𑘰𑘨𑘰𑘓𑘹𑘽𑘓𑘱 𑘁𑘽𑘐 𑘡𑘚𑘹𑙁', 'bhrulatāṃ māgilīkaḍe. makārāceṃci āṃga naḍe.' },
		{ '𑘨𑘽𑘥𑘰', 'raṃbhā' },
	}
	self:iterate(examples, 'do_test_translit')
end
 
return tests