Module:fi-hyphenation/testcases

Hello, you have come here looking for the meaning of the word Module:fi-hyphenation/testcases. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:fi-hyphenation/testcases, but we will also tell you about its etymology, its characteristics and you will know how to say Module:fi-hyphenation/testcases in singular and plural. Everything you need to know about the word Module:fi-hyphenation/testcases you have here. The definition of the word Module:fi-hyphenation/testcases will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:fi-hyphenation/testcases, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

All tests passed. (refresh)

TextExpectedActual
test_hyphenate:
Passedkuitenkinkui-ten-kinkui-ten-kin
Passedseassase-as-sase-as-sa
Passedpianopi-a-nopi-a-no
Passedgeometriage-o-met-ri-age-o-met-ri-a
Passedaurinkoau-rin-koau-rin-ko
Passedkissakis-sakis-sa
Passedmäärämää-rämää-rä
Passedkuorma-autokuor-ma-au-tokuor-ma-au-to
Passedvaa’anvaa-anvaa-an
Passedkolmivaihekilowattituntimittarikol-mi-vai-he-ki-lo-wat-ti-tun-ti-mit-ta-rikol-mi-vai-he-ki-lo-wat-ti-tun-ti-mit-ta-ri
Passedhajautuaha-jau-tu-aha-jau-tu-a
Passedhajauttaaha-ja-ut-taaha-ja-ut-taa
Passedsaippuakivikauppiassaip-pu-a-ki-vi-kaup-pi-assaip-pu-a-ki-vi-kaup-pi-as
Passedlämmityskulutläm-mi-tys-ku-lutläm-mi-tys-ku-lut
Passedsosiaalitieteetso-si-aa-li-tie-teetso-si-aa-li-tie-teet

local tests = require "Module:UnitTests"
local hyphenate = require "Module:fi-hyphenation".generate_hyphenation

local function link_fi(term)
	return '<span class="Latn" lang="fi">]</span>'
end

function tests:test_hyphenate()
	local examples = {
		{ "kuitenkin", "kui-ten-kin" },
		{ "seassa", "se-as-sa" },
		{ "piano", "pi-a-no" },
		{ "geometria", "ge-o-met-ri-a" },
		{ "aurinko", "au-rin-ko" },
		{ "kissa", "kis-sa" },
		{ "määrä", "mää-rä" },
		{ "kuorma-auto", "kuor-ma-au-to" },
		{ "vaa’an", "vaa-an" },
		{ "kolmivaihekilowattituntimittari", "kol-mi-vai-he-ki-lo-wat-ti-tun-ti-mit-ta-ri", "kolmi-vaihe-kilo-watti-tunti-mittari" },
		{ "hajautua", "ha-jau-tu-a" },
		{ "hajauttaa", "ha-ja-ut-taa" },
		{ "saippuakivikauppias", "saip-pu-a-ki-vi-kaup-pi-as", "saippua-kivi-kauppias" },
		{ "lämmityskulut", "läm-mi-tys-ku-lut", "lämmitys-kulut" },
		{ "sosiaalitieteet", "so-si-aa-li-tie-teet", "sosiaali-tieteet" },
	}
	
	local options = {}
	
	self:iterate(examples,
		function (self, term, expected, respelling)
			self:equals(
				link_fi(term),
				table.concat(hyphenate(respelling or term), "-"),
				expected, options)
		end)
end

return tests