Module:Sind-translit/testcases

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

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

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_sind:
Passed𑋝𑋡𑋟𑋐𑋢sindhīsindhī
Passed𑋝𑋡𑋑𑋪𑋐𑋢sindhīsindhī
Passed𑋖𑋠𑊿𑋧bhāṅobhāṅo
Passed𑋗𑋠𑋚𑋣mālumālu
Passed𑋂𑋥𑊺𑋧jekojeko
Passed𑋗𑋥𑋟mẽmẽ
Passed𑊷𑋟a͠ia͠i
Passed𑊻𑋩𑋔𑋙xabaraxabara

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

--TO DO
function tests:do_test_translit(sind, roman, xlit)
	self:equals('<span class="Sind" lang="sd">[[' .. sind .. '#Sind|' .. sind .. ']]</span>', sind_translit.tr(sind, 'sd', 'Sind'), roman)
end

function tests:test_translit_sind()
	local examples = {
		{ '𑋝𑋡𑋟𑋐𑋢', 'sindhī' },
		{ '𑋝𑋡𑋑𑋪𑋐𑋢', 'sindhī' },
        { '𑋖𑋠𑊿𑋧', 'bhāṅo' },
        { '𑋗𑋠𑋚𑋣', 'mālu' },
        { '𑋂𑋥𑊺𑋧', 'jeko' },
        { '𑋗𑋥𑋟', 'mẽ' },
        { '𑊷𑋟', 'a͠i' },
        { '𑊻𑋩𑋔𑋙', 'xabara' },
	}
	self:iterate(examples, 'do_test_translit')
end
 
return tests