Module:langues/testcases
Apparence
Tous les tests ont réussi (rafraichir)
Texte | Attendu | Obtenu | |
---|---|---|---|
![]() |
yue | zh-yue | zh-yue |
![]() |
fr | nil | nil |
![]() |
vro | fiu-vro | fiu-vro |
![]() |
conv | wikispecies | wikispecies |
![]() |
nan | zh-min-nan | zh-min-nan |
![]() |
nb | no | no |
![]() |
egl | eml | eml |
![]() |
lzh | zh-classical | zh-classical |
![]() |
nrf | nrm | nrm |
![]() |
gsw | als | als |
![]() |
cmn | zh | zh |
![]() |
rup | roa-rup | roa-rup |
![]() |
nn | no | no |
![]() |
sgs | bat-smg | bat-smg |
![]() |
fra-nor | nrm | nrm |
local tests = require('Module:UnitTests')
local langs = require('Module:langues')
function tests:test_get_lien_Wikimedia()
local args = {
['fr'] = {},
['cmn'] = {},
['conv'] = {},
['egl'] = {},
['fra-nor'] = {},
['gsw'] = {},
['lzh'] = {},
['nan'] = {},
['nb'] = {},
['nn'] = {},
['nrf'] = {},
['rup'] = {},
['sgs'] = {},
['vro'] = {},
['yue'] = {}
}
local testcases = {
['fr'] = nil,
['cmn'] = 'zh',
['conv'] = 'wikispecies',
['egl'] = 'eml',
['fra-nor'] = 'nrm',
['gsw'] = 'als',
['lzh'] = 'zh-classical',
['nan'] = 'zh-min-nan',
['nb'] = 'no',
['nn'] = 'no',
['nrf'] = 'nrm',
['rup'] = 'roa-rup',
['sgs'] = 'bat-smg',
['vro'] = 'fiu-vro',
['yue'] = 'zh-yue'
}
for word, args_ in pairs(args) do
wmlinks = testcases[word]
result = langs.get_lien_Wikimedia(word)
self:equals(word, result, wmlinks)
end
end
return tests