Module:mai-Tirh-translit/testcases

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

2 of 3 tests failed. (refresh)

TextExpectedActualDiffers atComments
test_translit:
Passed𑒂𑒨𑒺āyeāye
Failed𑒑𑒰𑒖𑒩gājargājara6
Failed𑒏𑒩𑒢𑒰karnākaranā4

local tests = require("Module:UnitTests")
local m_translit = require("Module:mai-Tirh-translit")

local sc = require("Module:scripts").getByCode("Tirh")
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"}, 
        {"𑒑𑒰𑒖𑒩", "gājar"}, 
        {"𑒏𑒩𑒢𑒰", "karnā"},

    }

    tests:iterate(examples, "check_translit")
end

return tests