Module:ps-translit/testcases
Appearance
- The following documentation is located at Module:ps-translit/testcases/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox (diff)
3 of 69 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
الله | allâh | allâh | |
اَذهان | aẕhân | aẕhân | |
اَژدَهار | aždahâr | aždahâr | |
غَټه | ǧaṭa | ǧaṭa | |
غَټَه | ǧaṭah | ǧaṭah | |
غَټَهْ | ǧaṭah | ǧaṭah | |
غَټْه | ǧaṭh | ǧaṭh | |
دْوه | dwa | dwa | |
دوه | doh | doh | |
دُوه | duh | duh | |
اوه | oh | oh | |
اَوه | awa | awa | |
کْيه | kya | kya | |
کيه | kih | kih | |
ايه | ih | ih | |
اَيه | aya | aya | |
ايمان | imân | imân | |
اوسيږې | osiǵe | osiǵe | |
اېران | erân | erân | |
دُوی | duy | duy | |
زوی | zoy | zoy | |
ځای | źây | źây | |
يُوسٙفزی | yusëfzay | yusëfzay | |
دے | day | day | |
بېی | bey | bey | |
څْوی | śway | śway | |
شْيی | šyay | šyay | |
وی | way | way | |
وي | wi | wi | |
يی | yay | yay | |
يئ | yëy | yëy | |
پَلَو | palaw | palaw | |
اُووۀ | uwë | uwë | |
نِيا | niâ | niâ | |
ؤ | wë | wë | |
يو | yo | yo | |
بايو | bâyo | bâyo | |
باوي | bâwi | bâwi | |
وايُو | wâyu | wâyu | |
بَيوت | bayot | bayot | |
کِيوډ | kioḍ | kioḍ | |
کيوْډ | kiwḍ | kyoḍ | |
کيوډ | kyoḍ | kyoḍ | |
کْيوډ | kyoḍ | kyoḍ | |
کُوِيډ | kuiḍ | kuiḍ | |
کويْډ | koyḍ | koiḍ | |
کُويْډ | kuyḍ | kuyḍ | |
کْويډ | kwiḍ | kwiḍ | |
کويډ | koyḍ | koyḍ | |
کيوي | kiwi | kyoy | |
کِيوي | kioy | kioy | |
کْيوي | kyoy | kyoy | |
وو | wo | wo | |
پِنځۀ | pĭnźë | pĭnźë | |
ګُلُونه | gŭluna | gŭluna | |
حِسّه | ḥĭssa | ḥĭssa | |
بيزو | bizo | bizo | |
پٙښتو | pëx̌to | pëx̌to | |
خوَړٙل | xwaṛël | xwaṛël | |
خَلاص | xalâṣ | xalâṣ | |
دْرې | dre | dre | |
ډَير | ḍayr | ḍayr | |
سپين | spin | spin | |
کَچالُو | kačâlu | kačâlu | |
دوبي | dobi | dobi | |
نْجٙلۍ | njëlëy | njëlëy | |
وايئ | wâyëy | wâyëy | |
ورور | wror | wror | |
هَلٙک | halëk | halëk |
-- Unit tests for [[Module:ps-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local ps_translit = require('Module:ps-translit')
local full_link = require('Module:links').full_link
local ps = require('Module:languages').getByCode('ps')
local function link(word)
return full_link{ term = word, lang = ps, tr = "-" }
end
--TO DO
function tests:do_test_translit(arabic, roman)
self:equals(link(arabic), ps_translit.tr(arabic, 'ps', 'ps-Arab'), roman)
end
function tests:test_translit_arabic()
local examples = {
-- h sematnics
{"الله", "allâh"},
{"اَذهان", "aẕhân"},
{"اَژدَهار", "aždahâr"},
{"غَټه", "ǧaṭa"},
{"غَټَه", "ǧaṭah"},
{"غَټَهْ", "ǧaṭah"},
{"غَټْه", "ǧaṭh"},
{"دْوه", "dwa"},
{"دوه", "doh"},
{"دُوه", "duh"},
{"اوه", "oh"},
{"اَوه", "awa"},
{"کْيه", "kya"},
{"کيه", "kih"},
{"ايه", "ih"},
{"اَيه", "aya"},
-- inital alif
{"ايمان", "imân"},
{"اوسيږې", "osiǵe"},
{"اېران", "erân"},
-- final y dipthongs
{"دُوی", "duy"},
{"زوی", "zoy"},
{"ځای", "źây"},
{"يُوسٙفزی", "yusëfzay"},
{"دے", "day"},
{"بېی", "bey"},
{"څْوی", "śway"},
{"شْيی", "šyay"},
{"وی", "way"},
{"وي", "wi"},
{"يی", "yay"},
{"يئ", "yëy"},
-- other dipthongs
{"پَلَو", "palaw"},
{"اُووۀ", "uwë"},
{"نِيا", "niâ"},
{"ؤ", "wë"},
-- u/y stuff
{"يو", "yo"},
{"بايو", "bâyo"},
{"باوي", "bâwi"},
{"وايُو", "wâyu"},
{"بَيوت", "bayot"},
{"کِيوډ", "kioḍ"},
{"کيوْډ", "kiwḍ"},
{"کيوډ", "kyoḍ"},
{"کْيوډ", "kyoḍ"},
{"کُوِيډ", "kuiḍ"},
{"کويْډ", "koyḍ"},
{"کُويْډ", "kuyḍ"},
{"کْويډ", "kwiḍ"},
{"کويډ", "koyḍ"},
{"کيوي", "kiwi"},
{"کِيوي", "kioy"},
{"کْيوي", "kyoy"},
{"وو", "wo"},
-- short vowels
{"پِنځۀ", "pĭnźë"},
{"ګُلُونه", "gŭluna"},
-- miscellaneous
{"حِسّه", "ḥĭssa"},
{"بيزو", "bizo"},
{"پٙښتو", "pëx̌to"},
{"خوَړٙل", "xwaṛël"},
{"خَلاص", "xalâṣ"},
{"دْرې", "dre"},
{"ډَير", "ḍayr"},
{"سپين", "spin"},
{"کَچالُو", "kačâlu"},
{"دوبي", "dobi"},
{"نْجٙلۍ", "njëlëy"},
{"وايئ", "wâyëy"},
{"ورور", "wror"},
{"هَلٙک", "halëk"},
}
self:iterate(examples, "do_test_translit")
end
return tests