Module:Deva-Beng-translit/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:Deva-Beng-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:Deva-Beng-translit.
All tests passed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
कर | কর | কর | ||
यन्त्र | যন্ত্র | যন্ত্র | ||
वायु | বায়ু | বায়ু | ||
सूर्य | সূর্য | সূর্য |
local tests = require("Module:UnitTests")
local m_translit = require("Module:Deva-Beng-translit")
local sc = require("Module:scripts").getByCode("Deva")
local lang = require("Module:languages").getByCode("bn")
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 = {
{"कर", "কর"},
{"यन्त्र", "যন্ত্র"},
{"वायु", "বায়ু"},
{"सूर्य", "সূর্য"},
}
tests:iterate(examples, "check_translit")
end
return tests