Module:pa-Arab-Mult-convert/sandbox/testcases

local tests = require('Module:UnitTests') local skr_convert = require('Module:pa-Arab-Mult-convert/sandbox') local m_links = require('Module:links')

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

function tests:do_test_convert(Saraiki, Mult, xlit) self:equals(link(Saraiki), skr_convert.tr(Saraiki, 'skr', 'pa-Arab'), Mult) end

function tests:test_convert_saraiki local examples = { { "اَتّے", "𑊀𑊖"}, -- word-initial /ə/ { "اَتّیْں", "𑊀𑊖"}, -- word-initial /ə/ { "اَٹھاراں‎", "𑊀‎𑊑𑊢"}, -- word-initial /ə/ { "آپے‎", "𑊀‎𑊛"}, -- word-initial /a/ { "اِرک", "𑊁𑊢𑊄"}, -- word-initial /i/ { "اُتّے‎", "𑊂𑊖"}, -- word-initial /u/ { "اُتّیْں‎", "𑊂𑊖"}, -- word-initial /u/ { "اُدڑ‎", "𑊂𑊘𑊧"}, -- word-initial /u/ { "اوْل", "𑊂𑊣"}, -- word-initial /o/ { "ایْکن", "𑊃𑊄𑊚"}, -- word-initial /e/ { "اَیْنک", "𑊃𑊚𑊄"}, -- word-initial /ai/ { "اَوْکھ", "𑊂𑊅"}, -- word-initial /au/ { "گھٹَّݨ", "𑊈𑊐𑊕"}, -- word-medial gemination { "کی", "𑊄𑊁"}, -- monosyllabic word ending in /i/ { "نا", "𑊚𑊀"}, -- monosyllabic word ending in /a/ { "ہَو", "𑊦𑊂"}, -- monosyllabic word ending in /o/ { "ہٹّ", "𑊦𑊐"}, -- word-final gemination { "اَسّاں", "𑊀𑊥"}, -- word-initial /a/ & word-medial gemination { "کلھا", "𑊄𑊣𑊦"}, -- /lh/ { "ٻال", "𑊝𑊣"}, -- implosive ٻ { "ݙاڑھی", "𑊓𑊨"}, -- implosive ݙ { "بزار", "𑊝𑊌𑊢"}, -- ز { "یاد", "𑊡𑊘"}, -- word-initial consonantal ی { "بھیݨ", "𑊟𑊕"}, -- word-medial vocalic ی { "چمڑی", "𑊊𑊠𑊧"}, -- word-final vocalic ی { "واسطے", "𑊤𑊥𑊖"}, -- word-initial consonantal و { "تاوݨ", "𑊖𑊤𑊕"}, -- word-medial consonantal و { "ڈو", "𑊒𑊂"}, -- word-final vocalic و { "پیوݨ", "𑊛𑊤𑊕"}, -- word-medial consonantal و & word-medial vocalic ی { "چھوہَر", "𑊋𑊦𑊢"}, -- word-medial vocalic و { "ترپݨ", "𑊓𑊛𑊕"}, -- word-initial /tr/ = 𑊓 { "ترِکّھا", "𑊓𑊅"}, -- word-initial /tr/ = 𑊓 { "تریمت", "𑊓𑊠𑊖"}, -- word-initial /tr/ = 𑊓 { "پَوِتْر", "𑊛𑊤𑊓"}, -- word-final /tr/ = 𑊓 & consonantal و { "آتَربھا", "𑊀𑊖𑊢𑊟"}, -- word-medial تر = 𑊓 & word-initial /a/ { "سرائیکی", "𑊥𑊢𑊁𑊄"}, -- [Independent Vowel]ئ[Independent Vowel] { "اوْئے", "𑊂𑊃"}, -- word-initial /o/ & [Independent Vowel]ئ[Independent Vowel] { "اُءِلا", "𑊂𑊁𑊣"}, -- [Independent Vowel]ء[Independent Vowel] & word-initial /u/ { "بھؤ", "𑊟𑊂"}, -- ؤ { "وَنڄَݨ", "𑊤𑊍𑊕"}, -- نڄ = 𑊍 & consonantal و { "چندا", "𑊊𑊘"}, -- ند = 𑊘 { "ترائے", "𑊓𑊃"}, -- word-initial /tr/ = 𑊓 & VئV { "پکݨ", "𑊛𑊄𑊕"}, { "کمبھار‎", "𑊄𑊠𑊟𑊢‎"}, { "وچ", "𑊤𑊊"}, { "مَرْنا‎", "𑊠𑊢𑊚"},

}	self:iterate(examples, "do_test_convert") end

return tests