Module:sa-Kthi-translit/testcases

From Wiktionary, the free dictionary
Jump to navigation Jump to search

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

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_kaithi:
Passed𑂯𑂢𑂴hanūhanū
Passed𑂣𑂜𑂯𑂱paṛhahipaṛhahi
Passed𑂣𑂜𑂯𑂱paṛhahipaṛhahi
Passed𑂮𑂱𑂨𑂀siyam̐siyam̐
Passed𑂕𑂩𑂅jharaïjharaï
Passed𑂄𑂏𑂱āgiāgi
Passed𑂞𑂹𑂩𑂰𑂮trāsatrāsa

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

local full_link = require('Module:links').full_link
local sa = require('Module:languages').getByCode('sa')

--TO DO
function tests:do_test_translit(kaithi, roman)
	self:equals(kaithi, kthi_translit.tr(kaithi, 'sa', 'Kthi'), roman)
end

function tests:test_translit_kaithi()
	local examples = {
		{'𑂯𑂢𑂴', 'hanū'},
		{'𑂣𑂜𑂯𑂱', 'paṛhahi'},
		{'𑂣𑂜𑂯𑂱', 'paṛhahi'},
		{'𑂮𑂱𑂨𑂀', 'siyam̐'},
		{'𑂕𑂩𑂅', 'jharaï'},
		{'𑂄𑂏𑂱', 'āgi'},
		{'𑂞𑂹𑂩𑂰𑂮', 'trāsa'},
	}
	
	self:iterate(examples, "do_test_translit")
end
 
return tests