All tests passed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
A | Latn | Latn | |
一 | Hani | Hani | |
ώ | Grek | Grek | |
ὦ | polytonic | polytonic | |
Ж | Cyrl | Cyrl | |
Ѹ | Cyrs | Cyrs | |
ꙑ | Cyrs | Cyrs | |
! | (nil) | (nil) |
local tests = require("Module:UnitTests")
local m_sc_recognition = require("Module:User:Erutuon/script_recognition")
function tests:check_charToScript(char, expected)
self:equals(
char,
m_sc_recognition.charToScript(char),
expected
)
end
function tests:test_charToScript()
local examples = {
{ "A", "Latn" },
{ "一", "Hani" },
{ "ώ", "Grek" },
{ "ὦ", "polytonic" },
{ "Ж", "Cyrl" },
{ "Ѹ", "Cyrs" },
{ "ꙑ", "Cyrs" },
{ "!", nil },
}
tests:iterate(examples, "check_charToScript")
end
return tests