Jump to content

Module:saz-translit/testcases

From Wiktionary, the free dictionary

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

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_saurashtra:
Passedꢦꢥꢶpanipani
Passedꢮꢵꢔ꣄vāgvāg
Passedꢪꢛ꣄ꢙꢶꢬꢶmañjirimañjiri
Passedꢕꣁꢞꣁghoḍoghoḍo
Passedꢣꢸꢒ꣄ꢒꢬ꣄dukkardukkar

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

function tests:check_translit(Saur, roman)
	self:equals('<span class="Saur mention" lang="saz">[[' .. Saur .. '#Saur|' .. Saur .. ']]</span>', saz_translit.tr(Saur, 'saz', 'Saur'), roman)
end

function tests:test_translit_saurashtra()
	self:check_translit('ꢦꢥꢶ', 'pani')
	self:check_translit('ꢮꢵꢔ꣄', 'vāg')
	self:check_translit('ꢪꢛ꣄ꢙꢶꢬꢶ', 'mañjiri')
	self:check_translit('ꢕꣁꢞꣁ', 'ghoḍo')
	self:check_translit('ꢣꢸꢒ꣄ꢒꢬ꣄', 'dukkar')
end
 
return tests