Module:User:ObnoxiousCoder/hit-common/testcases

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

All tests passed. (refresh)

TextExpectedActual
test_naive_transliteration:
Passedattašat-ta-ašat-ta-aš
Passedzaḫḫiyauwanziza-aḫ-ḫi-ya-ú-wa-an-ziza-aḫ-ḫi-ya-ú-wa-an-zi
Passedwātarwa-a-tarwa-a-tar
Passedarāša-ra-a-aša-ra-a-aš
Passedalpašal-pa-ašal-pa-aš
Passedišḫarwanzaiš-ḫar-wa-an-zaiš-ḫar-wa-an-za
Passedēšḫare-eš-ḫare-eš-ḫar
Passedēšḫarnuzzie-eš-ḫar-nu-uz-zie-eš-ḫar-nu-uz-zi
Passedēšḫaškanzae-eš-ḫa-aš-kán-zae-eš-ḫa-aš-kán-za
Passedalpuwašal-pu-wa-ašal-pu-wa-aš
Passedkeššarke-eš-šarke-eš-šar
Passedtaḫurwailinta-ḫur-wa-i-li-inta-ḫur-wa-i-li-in
Passedperanpé-ra-anpé-ra-an
Passedpittuliyašpít-tu-li-ya-ašpít-tu-li-ya-aš
Passedkišatki-ša-atki-ša-at

local hit_common = require('Module:User:ObnoxiousCoder/hit-common')
local tests = require('Module:UnitTests')


function tests:test_naive_transliteration() 
	local testcases = {
		{"attaš", "at-ta-aš"}, 
		{"zaḫḫiyauwanzi", "za-aḫ-ḫi-ya-ú-wa-an-zi"},
		{"wātar", "wa-a-tar"}, 
		{"arāš", "a-ra-a-aš"}, 
		{"alpaš", "al-pa-aš"},
		{"išḫarwanza", "iš-ḫar-wa-an-za"}, 
		{"ēšḫar", "e-eš-ḫar"},
		{"ēšḫarnuzzi", "e-eš-ḫar-nu-uz-zi"},
		{"ēšḫaškanza", "e-eš-ḫa-aš-kán-za"}, 
		{"alpuwaš", "al-pu-wa-aš"}, 
		{"keššar", "ke-eš-šar"},
		{"taḫurwailin", "ta-ḫur-wa-i-li-in"},
		{"peran", "pé-ra-an"}, 
		{"pittuliyaš", "pít-tu-li-ya-aš"}, 
		{"kišat", "ki-ša-at"}, 

	}
	
	tests:iterate(
		testcases, 
		function(self, input, expected)
		self:equals(input, hit_common.naive_transliteration(input), expected)
	end)
end
return tests