Module:sandbox/pnb-convert/testcases

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


-- Unit tests for ]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local ur_convert = require('Module:pnb-convert/sandbox')
local m_links = require('Module:links')

local ur = require('Module:languages').getByCode('ur')
local function link(term)
	return m_links.full_link{term = term, lang = ur}
end

function tests:do_test_convert(Urdu, Guru, xlit)
	self:equals(link(Urdu), ur_convert.tr(Urdu, 'ur', 'ur-Arab'), Guru)
end

function tests:test_convert_urdu()
	local examples = {
		{"جُھوٹھ", "ਝੂਠ"},
		{"گَھر", "ਘਰ"},
		{"میز", "ਮੇਜ਼"},
		{"مَوسَم", "ਮੌਸਮ"},
		{"پَینْدا", "ਪੈਂਦਾ"},
		{"تُہاڈا", "ਤੁਹਾਡਾ"},
		{"لان٘گھا", "ਲਾਂਘਾ"},
		{"جَھلّا", "ਝੱਲਾ"},
		{"نِچّھ", "ਨਿੱਛ"},
		{"لِتَّر", "ਲਿੱਤਰ"},
		{"چِھتَّر", "ਛਿੱਤਰ"},
		{"رَوࣇا", "ਰੌਲ਼ਾ"},
		{"تْراہ", "ਤ੍ਰਾਹ"},
	}
	
	self:iterate(examples, "do_test_convert")
end	

return tests