This is the unit-testing module for Module:mai-translit.
1 of 8 tests failed. (refresh)
Text | Expected | Actual | Differs at | Comments | |
---|---|---|---|---|---|
आयॆ | āye | āye | |||
आऒ | āo | āo | |||
इऒ | io | io | |||
इऎ | ie | ie | |||
अय़ | aë | aë | |||
चॏमुखऺ | cǒmukhâ | cǒmukhâ | |||
चव़मुखऺ | caömukhâ | caömukhâ | |||
रवि | ravi | ravɨ | 4 |
local tests = require("Module:UnitTests")
local m_translit = require("Module:mai-translit")
local sc = require("Module:scripts").getByCode("Deva")
local lang = require("Module:languages").getByCode("mai")
function link(term)
return require("Module:links").full_link {term = term, lang = lang, tr = "-", sc = sc}
end
function tests:check_translit(term, expected)
tests:equals(link(term), m_translit.tr(term), expected)
end
function tests:test_translit()
local examples = {
{"आयॆ", "āye"},
{"आऒ", "āo"},
{"इऒ", "io"},
{"इऎ", "ie"},
{"अय़", "aë"},
{"चॏमुखऺ", "cǒmukhâ"},
{"चव़मुखऺ", "caömukhâ"},
{"रवि", "ravi"},
}
tests:iterate(examples, "check_translit")
end
return tests