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

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_kharoshthi:
Passed𐨯𐨿𐨤𐨒𐨿𐨪spagraspagra
Passed𐨯𐨿𐨤𐨌spāspā
Passed𐨀𐨁𐨩𐨎iyaṃiyaṃ
Passed𐨀𐨂𐨡𐨒𐨹udaǵaudaǵa
Passed𐨀𐨂𐨬𐨗𐨸𐨩uvaj̄ayauvaj̄aya
Passed𐨕𐨂𐨫𐨒𐨹culaǵaculaǵa
Passed𐨒𐨍𐨸ḡa͚ḡa͚
Passed𐨀𐨂𐨤𐨫𐨍𐨧𐨁upala͚bhiupala͚bhi
Passed𐨀𐨂𐨍𐨟𐨨u͚tamau͚tama
Passed𐨀𐨅𐨬 𐨨𐨅 𐨭𐨂𐨡𐨹eva me śud́aeva me śud́a
Passed𐨪𐨂𐨖rucharucha
Passed𐨦𐨿𐨪𐨨𐨞bramaṇabramaṇa
Passed𐨤𐨿𐨪𐨁𐨟𐨁pritipriti
Passed𐨤𐨂𐨟𐨿𐨪putraputra
Passed𐨀𐨒𐨁agiagi
Passed𐨣𐨀𐨫𐨂𐨡𐨆naaludonaaludo
Passed𐨨𐨙𐨯𐨹𐨁mañas̱imañas̱i

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

--TO DO
function tests:do_test_translit(khar, roman, xlit)
	self:equals('<span class="Khar" lang="und">[[' .. khar .. ']]</span>', Khar_translit.tr(khar, 'und', 'Khar'), roman)
end

function tests:test_translit_kharoshthi()
	self:do_test_translit('𐨯𐨿𐨤𐨒𐨿𐨪', 'spagra')
	self:do_test_translit('𐨯𐨿𐨤𐨌', 'spā')
	self:do_test_translit('𐨀𐨁𐨩𐨎', 'iyaṃ')
	self:do_test_translit('𐨀𐨂𐨡𐨒𐨹', 'udaǵa')
	self:do_test_translit('𐨀𐨂𐨬𐨗𐨸𐨩', 'uvaj̄aya')
	self:do_test_translit('𐨕𐨂𐨫𐨒𐨹', 'culaǵa')
	self:do_test_translit('𐨒𐨍𐨸', 'ḡa͚') -- Needs AAT to render!  Lone syllable, attestation desirable.
	self:do_test_translit('𐨀𐨂𐨤𐨫𐨍𐨧𐨁', 'upala͚bhi')
	self:do_test_translit('𐨀𐨂𐨍𐨟𐨨', 'u͚tama')
	self:do_test_translit('𐨀𐨅𐨬 𐨨𐨅 𐨭𐨂𐨡𐨹', 'eva me śud́a') -- with space characters
	self:do_test_translit('𐨪𐨂𐨖', 'rucha')
	self:do_test_translit('𐨦𐨿𐨪𐨨𐨞', 'bramaṇa')
	self:do_test_translit('𐨤𐨿𐨪𐨁𐨟𐨁', 'priti')
	self:do_test_translit('𐨤𐨂𐨟𐨿𐨪', 'putra')
	self:do_test_translit('𐨀𐨒𐨁', 'agi')
	self:do_test_translit('𐨣𐨀𐨫𐨂𐨡𐨆', 'naaludo') -- personal name in Mathura lion inscription
	self:do_test_translit('𐨨𐨙𐨯𐨹𐨁', 'mañas̱i') -- S with under-macron followed by vowel
end
 
return tests