Module:sa-Guru-translit/testcases

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

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

1 of 3 tests failed. (refresh)

TextExpectedActualDiffers at
test_translit_gurmukhi:
Passedਵੇਲਾvelāvelā
Passedਸੁਵਰ੍ਣsuvarṇasuvarṇa
Failedਅਸ਼੍ਟaśṭaasa਼੍ṭa2

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

local full_link = require('Module:links').full_link
local sa = require('Module:languages').getByCode('sa')

--TO DO
function tests:do_test_translit(gurmukhi, roman)
	self:equals(gurmukhi, guru_translit.tr(gurmukhi, 'sa', 'Guru'), roman)
end

function tests:test_translit_gurmukhi()
	local examples = {
		{'ਵੇਲਾ', 'velā'},
		{'ਸੁਵਰ੍ਣ', 'suvarṇa'},
		{'ਅਸ਼੍ਟ', 'aśṭa'},
	}
	
	self:iterate(examples, "do_test_translit")
end
 
return tests