Module:Khar-translit/testcases

-- 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(' ' .. khar .. ' ', 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