Jump to content

Module:User:Wikispeedier/bn-splitverb/testcases

From Wiktionary, the free dictionary


local module = require("Module:User:Wikispeedier/bn-splitverb")
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()

local function format(t)
	return t.stem .. "|" .. t.ending
end

local function format_tr(t)
	return t.stem_tr .. "|" .. t.ending_tr
end

function suite:test_split()
	self:assertEquals("কর|া", format(module.split("করা")))
	self:assertEquals("ন|েওয়া", format(module.split("নেওয়া")))
	self:assertEquals("চা|ওয়া", format(module.split("চাওয়া")))
	self:assertEquals("ঢোক|ানো", format(module.split("ঢোকানো")))
	self:assertEquals("বের|োনো", format(module.split("বেরোনো")))
	self:assertEquals("ভোল|া", format(module.split("ভোলা")))
	self:assertEquals("আঁক|া", format(module.split("আঁকা")))
	self:assertEquals("এগ|নো", format(module.split("এগনো")))
	self:assertEquals("ধো|য়া", format(module.split("ধোয়া")))
end

function suite:test_split()
	self:assertEquals("kôr|a", format_tr(module.split_tr("kôra")))
	self:assertEquals("n|eẇa", format_tr(module.split_tr("neẇa")))
	self:assertEquals("ca|ẇa", format_tr(module.split_tr("caẇa")))
	self:assertEquals("ḑhok|ano", format_tr(module.split_tr("ḑhokano")))
	self:assertEquals("ber|ono", format_tr(module.split_tr("berono")))
	self:assertEquals("bhol|a", format_tr(module.split_tr("bhola")))
	self:assertEquals("ãk|a", format_tr(module.split_tr("ãka")))
	self:assertEquals("egô|no", format_tr(module.split_tr("egôno")))
	self:assertEquals("dho|ẇa", format_tr(module.split_tr("dhoẇa")))
end

return suite