Modulo:Fuso orario/test
-- Unit tests per il [[Modulo:Fuso orario]]. Cliccare sulla pagina di discussione per eseguire i test.
local p = require('Modulo:UnitTests')
function p:test_parametri()
self:preprocess_equals_many("{{Determina fuso orario/Sandbox|", "}}", {
-- precedenza al valore indicato
{ "-12|from=Q38", "[[UTC-12]]" },
{ "+12|from=Q38", "[[UTC+12]]" },
-- errmsg
{ "test|from=Q38|errmsg=test", "test" },
-- iso3166
{ "iso3166=CYP", "[[UTC+2]]" },
-- multiplo
{ "from=Q408|multiplo=no", "" },
{ "iso3166=AUS|multiplo=no", "" }
})
end
function p:test_property()
self:preprocess_equals_many("{{Determina fuso orario/Sandbox|", "}}", {
-- Innsbruck (Q1735) => un solo fuso orario (P421) senza qualificatori
{ "from=Q1735", "[[UTC+1]]" },
-- Siviglia (Q8717) => due fuso orario (P421) con qualificatore "periodo di validità (P1264)":
-- tempo standard (Q1777301) e ora legale (Q36669) => restituisce quello con Q1777301
{ "from=Q8717", "[[UTC+1]]" },
-- Malmö (Q503361) => fuso orario (P421) assente, ottenuto tramite paese (P17) => Svezia
{ "from=Q503361", "[[UTC+1]]" },
-- Malmö (Q503361) => fuso orario (P421) assente, precedenza a iso3166
{ "from=Q503361|iso3166=CYP", "[[UTC+2]]" },
-- Cina (Q148) => China Standard Time (Q1143153) => utilizzo di "considerato essere uguale a (P460)"
{ "from=Q148", "[[UTC+8]]" },
-- Guernsey (Q25230) => Greenwich Mean Time (Q30192) tra gli alias
{ "from=Q25230", "[[UTC+0]]" },
-- Spagna
{ "from=Q29", "<ul><li>[[UTC+0]]</li><li>[[UTC+1]]</li></ul>" },
{ "from=Q29|multiplo=no", "" },
{ "from=Q433958", "[[UTC+0]]" },
{ "from=Q904151", "[[UTC+1]]" }
})
end
return p
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.