Module:inc-ohi-translit/testcases
Appearance
- The following documentation is located at Module:inc-ohi-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
This is the unit-testing module for Module:inc-ohi-translit/testcases.
All tests passed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
ناتی | naty | naty | ||
ناتي | naty | naty | ||
سہس | shs | shs | ||
سهس | shs | shs | ||
شریعت | śry't | śry't | ||
اکڙ | akṛ | akṛ | ||
عورت | 'vrt | 'vrt | ||
هوٿ | hvṭ | hvṭ | ||
ہوٹ | hvṭ | hvṭ | ||
اے | ae | ae | ||
هيں | hyṉ | hyṉ | ||
بھيد | bhyd | bhyd | ||
کئ | ky | ky | ||
کوئے | kvye | kvye | ||
سُورَۃ | svrh | svrh | ||
فَوراً | fvra | fvra | ||
گان٘وں | ganvṉ | ganvṉ | ||
چائے | caye | caye | ||
کُھلْواؤ | khlvav | khlvav | ||
ماشاءالہ | maśa'alh | maśa'alh | ||
ﷲ | alah | alah | ||
قرآن | qrān | qrān | ||
آندھی | āndhy | āndhy | ||
زکوٰۃ | zkvh | zkvh |
-- Unit tests for [[Module:inc-ohi-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local inc_ohi_translit = require('Module:inc-ohi-translit')
local full_link = require('Module:links').full_link
local inc_ohi = require('Module:languages').getByCode('inc-ohi')
local function link(word)
return full_link{ term = word, lang = inc_ohi, tr = "-" }
end
--TO DO
function tests:do_test_translit(arabic, roman)
self:equals(link(arabic), inc_ohi_translit.tr(arabic, 'inc-ohi', 'ur-Arab'), roman)
end
function tests:test_translit_arabic()
local examples = {
{'ناتی', 'naty'},
{'ناتي', 'naty'},
{'سہس', 'shs'},
{'سهس', 'shs'},
{'شریعت', "śry't"},
{'اکڙ', 'akṛ'},
{'عورت', "'vrt"},
{'هوٿ', 'hvṭ'},
{'ہوٹ', 'hvṭ'},
{'اے', 'ae'},
{'هيں', 'hyṉ'},
{'بھيد', 'bhyd'},
{'کئ', 'ky'},
{'کوئے', 'kvye'},
{'سُورَۃ', 'svrh'},
{'فَوراً', 'fvra'},
{'گان٘وں', 'ganvṉ'},
{'چائے', 'caye'},
{'کُھلْواؤ', 'khlvav'},
{'ماشاءالہ', "maśa'alh"},
{'ﷲ', "alah"},
{'قرآن', 'qrān'},
{'آندھی', 'āndhy'},
{'زکوٰۃ', 'zkvh'},
}
self:iterate(examples, "do_test_translit")
end
return tests