Jump to content

Module:ur-translit/testcases

Wiktionary වෙතින්

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

4 of 68 tests failed. (refresh)

TextExpectedActualDiffers at
test_translit_urdu:
Passedاِیرانِیīrānīīrānī
Passedماشاءاَللّٰہmāśā'allāhmāśā'allāh
Passedپَیدائِشpaidāiśpaidāiś
Passedبَرْقِیاتbarqiyātbarqiyāt
Passedعَقْل'aql'aql
Passedعِزَّت'izzat'izzat
Passedعَین'ain'ain
Passedعالَم'ālam'ālam
Passedعَورَت'aurat'aurat
Passedشُرُوعśurū'śurū'
Passedاِشْعاعiś'ā'iś'ā'
Passedتَعَلُّقاتta'alluqātta'alluqāt
Passedتَعَلُّقta'alluqta'alluq
Passedمُتَعَلِّقmuta'alliqmuta'alliq
Passedمتعلق(nil)(nil)N/A
Passedعُمْر'umr'umr
Passedدَفْعَہdaf'adaf'a
Passedبَچَّہbaccabacca
Passedقُوَّتquvvatquvvat
Passedمَۓ عِشْقma-ye 'iśqma-ye 'iśq
Passedشیرِ پَنْجابśer-i pañjābśer-i pañjāb
Passedمَلْکَۂ دُنْیاmalka-yi dunyāmalka-yi dunyā
Passedجَمُّوںjammū̃jammū̃
Passedآمāmām
Passedاِشْتِراکِیَّتiśtirākiyyatiśtirākiyyat
Passedسِسَکْناsisaknāsisaknā
Passedپُلpulpul
Passedعِیسیٰ'īsā'īsā
Passedاَعْلیٰa'lāa'lā
Passedلَفْظlafzlafz
Passedحاضِرhāzirhāzir
Passedبَہوراbahorābahorā
Passedنَہِیںnahī̃nahī̃
Passedاِشْتِمالِیَتiśtimāliyatiśtimāliyat
Passedچَوڑاcauṛācauṛā
Passedتِھیںthī̃thī̃
Passedکُتّاkuttākuttā
Passedپَہْلےpahlepahle
Passedکِھلائیkhilāīkhilāī
Passedکھلائی(nil)(nil)N/A
Passedٹَھہَرْناṭhaharnāṭhaharnā
Passedتَیمُورtaimūrtaimūr
Passedفَوراًfauranfauran
Passedکوئےkoekoe
Passedمَنَّتوںmannatõmannatõ
Passedگان٘وںgā̃õgā̃õ
Passedمَیںma͠ima͠i
Passedآئیāīāī
Passedمَکَّھنmakkhanmakkhan
Passedخُداxudāxudā
Passedکَئیkaīkaī
Passedکُئیkuīkuī
Passedچائےcāecāe
Passedکُھلْواؤkhulvāokhulvāo
Passedغَدّارġaddārġaddār
Passedبَیٹھوbaiṭhobaiṭho
Passedبَطَّخbattaxbattax
Passedمُتَّحِدَۂmuttahida-yimuttahida-yi
Passedساؤُتھ اَفْرِیقَہsāuth afrīqasāuth afrīqa
Passedکُلِّیَّہkulliyyakulliyya
Passedدائِرَۃُdāiratudāiratu
Passedسُورَۃsūrasūra
Passedبِلّاbillābillā
Failedدائِرَۃُ الْمَعارِفdāiratu l-ma'ārifdāiratu اlma'ārif9
Failedدائِرَۃْ اُلْمَعارِفdāirat ulma'ārifdāirah ulma'ārif6
Passedآیَت اُللّٰہāyat ullāhāyat ullāh
Failedصَیّادsayyādsaiyād3
Failedکہاں(nil)khā̃N/A


Random long strings of text to test for errors in running text, NONE of the sections should be blank.


alif be bhe pe phe te the se jīm jhīm ce che baṛī he xe dāl dhāl ḍāl ḍhāl zāl re ṛe ṛhe ze źe sīn śīn svād zvād tā zā 'ain ġain fe qāf kāf khāf gāf ghāf lām mīm nūn nūn ġunna he vāo ye baṛī ye

  • There should be text here ^

dīdār terā milnī ke ba'd hī chūṭe merī aṅgaṛāī

tū hī batā de kyū̃ zālimā ma͠i kihlāī

kyū̃ is tarāh se duniyā jahā̃ ma͠i

kartā hai merī rusvāī

terā qasūr aur zālimā ma͠i kihlāī

kyū̃

  • There should be text here ^

ma͠i yahā̃ vahā̃ jāũ jahā̃ dar badar badar tere lie rihte hū̃ be sabar sabar sabar tere be qarāriyū̃ 'iśq 'iśq hai malaṅg merā

mere mannatõ ma͠i mere jannatõ tere hī terā hai śumār hai

o mere māhie jinnā sonā na koī hoyā na koī honā je ma͠i pittal te o sonā bā xudā

  • There should be text here ^

nasalization test gā̃o

gāno

gāõ

gā̃õ

ãvā

anvā

raṅg

bãḍ

  • There should be text here ^

kāl māhī dī akhā̃ na akhā̃ ho gayā̃ othe jannat dekh darvāze āī ma͠i

merī rūh-i kā parinda phaṛphaṛāe lekin sukūn kā jazīra mil na pāe ve kī karā̃ ve kī karā̃

koye

  • There should be text here ^

daf'a: 1 tamām insān āzād aur huqūq o 'izzat ke i'tibār se barābar paidā hue ha͠i unhẽ zamīr aur 'aql vadī'at huī ha͠i is lie unhẽ ek dūsre ke sāth bhāī cāre kā sulūk karnā cāhie.

  • There should be text here ^


-- Unit tests for [[Module:ur-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local ur_translit = require('Module:ur-translit')

local full_link = require('Module:links').full_link
local ur = require('Module:languages').getByCode('ur')

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

function tests:do_test_translit(Urdu, roman)
	self:equals(link(Urdu), ur_translit.tr(Urdu, 'ur', 'ur-Arab'), roman)
end

function tests:test_translit_urdu()
	local examples = {
		{ "اِیرانِی", "īrānī"},
		{ "ماشاءاَللّٰہ", "māśā'allāh"},
		{ "پَیدائِش", "paidāiś"},
		{ "بَرْقِیات", "barqiyāt"},
		{ "عَقْل", "'aql" },
		{ "عِزَّت", "'izzat" },
		{ "عَین", "'ain" },
		{ "عالَم", "'ālam" },
		{ "عَورَت", "'aurat" },
		{ "شُرُوع", "śurū'" },
		{ "اِشْعاع"	, "iś'ā'" },
		{ "تَعَلُّقات", "ta'alluqāt" },
		{ "تَعَلُّق", "ta'alluq" },
		{ "مُتَعَلِّق", "muta'alliq" },
		{ "متعلق", nil }, -- this test should fail for the lack of vocalisation
		{ "عُمْر", "'umr" },
		{ "دَفْعَہ", "daf'a" },
		{ "بَچَّہ", "bacca" },
		{ "قُوَّت", "quvvat" },
		{ "مَۓ عِشْق", "ma-ye 'iśq" },
		{ "شیرِ پَنْجاب", "śer-i pañjāb" },
		{ "مَلْکَۂ دُنْیا", "malka-yi dunyā" },
		{ "جَمُّوں", "jammū̃"},
		{ "آم", "ām" },
		{ "اِشْتِراکِیَّت", "iśtirākiyyat"},
		{ "سِسَکْنا","sisaknā"},
		{ "پُل","pul"},
		{ "عِیسیٰ", "'īsā"},
		{ "اَعْلیٰ", "a'lā"},
		{ "لَفْظ","lafz"},
		{ "حاضِر", "hāzir" },
		{ "بَہورا", "bahorā"},
		{ "نَہِیں", "nahī̃"},
		{ "اِشْتِمالِیَت", "iśtimāliyat"},
		{ "چَوڑا", "cauṛā" },
		{ "تِھیں", "thī̃"},
		{ "کُتّا", "kuttā" },
		{ "پَہْلے", "pahle"},
		{ "کِھلائی", "khilāī"},
		{ "کھلائی", nil },	-- "khl" must be an impossible cluster at the beginning of a word
		--this one is supposed to fail
		{ "ٹَھہَرْنا", "ṭhaharnā"},
		{ "تَیمُور", "taimūr"},
		{ "فَوراً", "fauran"},
		{ "کوئے", 
		"koe"}, 
		{ "مَنَّتوں", 
		"mannatõ"},
		{ "گان٘وں", 
		"gā̃õ"},
		{ "مَیں", 
		"ma͠i"},
		{ "آئی", 
		"āī"},
		{ "مَکَّھن", 
		"makkhan"},
		{ "خُدا", "xudā" },
		{ "کَئی", "kaī" },
		{ "کُئی", "kuī" },
		{ "چائے", "cāe" },
		{ "کُھلْواؤ", "khulvāo" },
		{ "غَدّار", "ġaddār"},
		{ "بَیٹھو", "baiṭho"},
		{ "بَطَّخ", "battax"},
		{"مُتَّحِدَۂ", "muttahida-yi"},
		{ "ساؤُتھ اَفْرِیقَہ", 
			"sāuth afrīqa"},
		{"کُلِّیَّہ", "kulliyya"},
		{"دائِرَۃُ", 
			"dāiratu"},
		{ "سُورَۃ", "sūra"}, -- alt form of سُورَہ
		{"بِلّا", "billā"},
		{"دائِرَۃُ الْمَعارِف", "dāiratu l-ma'ārif"}, -- restoring this case, pls check the line below
		{"دائِرَۃْ اُلْمَعارِف", "dāirat  ulma'ārif" }, -- is that a more appropriate spelling?
		{"آیَت اُللّٰہ", "āyat ullāh"}, -- allāh fails when there is a diacritic over alif 
		{"صَیّاد", "sayyād"}, -- testing tashdid on ye
		{"کہاں", nil}, -- should fail
	}
	
	self:iterate(examples, "do_test_translit")
end	

return tests
"https://si.wiktionary.org/w/index.php?title=Module:ur-translit/testcases&oldid=48350" වෙතින් සම්ප්‍රවේශනය කෙරිණි