-- Unit tests per il [[Modulo:Codice statistico]]. Cliccare sulla pagina di discussione per eseguire i test.
local p = require('Modulo:UnitTests')
function p:test_params()
self:preprocess_equals_many("{{Codice statistico/Sandbox|", "}}", {
{ "test|from=Q220", "test" },
{ "iso3166=ITA|from=Q220", "058091" },
{ "from=Q2807|grado=test", "28079" }
})
end
function p:test_property()
self:preprocess_equals_many("{{Codice statistico/Sandbox|", "}}", {
-- AUT
{ "from=Q1741", "[http://www.statistik.at/blickgem/gemDetail.do?gemnr=90001 9 00 01]" },
-- CHE
{ "from=Q70", "0351" },
-- CZE
{ "from=Q1085", "554782" },
-- DEU
{ "from=Q64", "[http://www.statistik-portal.de/Statistik-Portal/gemeindeverz.asp?G=11000000 11 0 00 000]" },
{ "from=Q8608|grado=3", "07 1 32" },
-- ESP
{ "from=Q2807", "28079" },
-- FRA
{ "from=Q41604", "[http://www.insee.fr/fr/themes/dossier_complet.asp?codgeo=COM-80021 80021]" },
{ "from=Q12130|grado=1", "53" },
{ "from=Q3349|grado=2", "22" },
{ "from=Q18129|grado=4", "21 14" },
-- ITA
{ "from=Q220", "058091" }
})
end
return p