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

બધા કસોટીઓ સફળ થયા. (refresh)


-- Unit tests for [[Module:sa-translit]]. Refresh page to run tests.
local tests = require('Module:એકમકસોટી')
local sa_translit = require('Module:sa-translit')

--કરવાનું
function tests:do_test_translit(sans, gujr, xlit)
	self:equals('<span class="Sans" ભાષા="a>[[' .. sans .. '#Sans|' .. sans .. ']]</span>', sa_translit.tr(sans, 'sa', 'Sans'), gujr)
end

function tests:test_translit_sanskrit()
	self:do_test_translit('वाक्', 'વાક્')
	self:do_test_translit('वाक', 'વાક')
	self:do_test_translit('अदृष्ट', 'અદૃષ્ટ')
	self:do_test_translit('सोऽहम्', 'સોઽહમ્')
	self:do_test_translit('दुःख', 'દુઃખ')

end
 
return tests