Module:Cyrs-translit/testcases

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

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

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_cu:
Passedоуuu
Passedсꙑнъsynŭsynŭ
Passedѣхатиěxatiěxati
Passedбѣлъbělŭbělŭ
Passed-ъѣ--ŭě--ŭě-
Passedаѵavav
Passedщенѧštenęštenę
Passedчетꙑреčetyrečetyre
Passedзаѧцьzaęcĭzaęcĭ
TextExpectedActualDiffers at
test_translit_ono:
Passedоуuu
Passedстръиstrŷistrŷi
Passedѣхатиjěxatijěxati
Passedбѣлъbělŭbělŭ
Passed-ъѣ--ŭjě--ŭjě-
Passedаѵavav
Passedщенѧśćenęśćenę
Passedчетꙑреćetyrećetyre
Passedꙁаѧцьzajęćĭzajęćĭ
TextExpectedActualDiffers at
test_translit_orv:
Passedоуuu
Passedстръиstrŷistrŷi
Passedѣхатиjěxatijěxati
Passedбѣлеběleběle
Passed-ъѣ--ŭjě--ŭjě-
Passedаѵavav
Passedщенѧščenęščenę
Passedчетꙑреčetyrečetyre
Passedзаѧцьzajęcĭzajęcĭ

local tests = require('Module:UnitTests')
local m_tr = require('Module:Cyrs-translit')

local full_link = require('Module:links').full_link
local lang_cu = require('Module:languages').getByCode('cu')
local lang_ono = require('Module:languages').getByCode('zle-ono')
local lang_orv = require('Module:languages').getByCode('orv')

local function link(word, lang)
	return full_link{ term = word, lang = lang, tr = "-" }
end

function tests:do_test_translit_cu(word, tr)
	self:equals(link(word, lang_cu), m_tr.tr(word, "cu"), tr)
end

function tests:do_test_translit_ono(word, tr)
	self:equals(link(word, lang_ono), m_tr.tr(word, "zle-ono"), tr)
end

function tests:do_test_translit_orv(word, tr)
	self:equals(link(word, lang_orv), m_tr.tr(word, "orv"), tr)
end

function tests:test_translit_cu()
	local examples = {
		{ "оу", "u" },
		{ "сꙑнъ", "synŭ" },
		{ "ѣхати", "ěxati" },
		{ "бѣлъ", "bělŭ" },
		{ "-ъѣ-", "-ŭě-" },
		{ "аѵ", "av" },
		{ "щенѧ", "štenę" },
		{ "четꙑре", "četyre" },
		{ "заѧць", "zaęcĭ" },
	}
	
	self:iterate(examples, "do_test_translit_cu")
end

function tests:test_translit_ono()
	local examples = {
		{ "оу", "u" },
		{ "стръи", "strŷi" },
		{ "ѣхати", "jěxati" },
		{ "бѣлъ", "bělŭ" },
		{ "-ъѣ-", "-ŭjě-" },
		{ "аѵ", "av" },
		{ "щенѧ", "śćenę" },
		{ "четꙑре", "ćetyre" },
		{ "ꙁаѧць", "zajęćĭ" },
	}
	
	self:iterate(examples, "do_test_translit_ono")
end

function tests:test_translit_orv()
	local examples = {
		{ "оу", "u" },
		{ "стръи", "strŷi" },
		{ "ѣхати", "jěxati" },
		{ "бѣле", "běle" },
		{ "-ъѣ-", "-ŭjě-" },
		{ "аѵ", "av" },
		{ "щенѧ", "ščenę" },
		{ "четꙑре", "četyre" },
		{ "заѧць", "zajęcĭ" },
	}
	
	self:iterate(examples, "do_test_translit_orv")
end
 
return tests