Pojdi na vsebino

Modul:Sources/tests

Iz Wikipedije, proste enciklopedije
-- Unit tests for [[Modul:Sources]]. Click talk page to run tests.
local p = require('Modul:UnitTests')

function p:test_Sources()
    self:preprocess_equals('{{#invoke:Sources | renderSource | Q20750516}}', '<span class="wikidata_cite citetype_Q2061228" data-entity-id="Q20750516">[[:sl:s:Kaj mora vedeti vsak Slovenec o Osvobodilni fronti|Kaj mora vedeti vsak Slovenec o Osvobodilni fronti «1944»]]</span>')
    self:preprocess_equals('{{#invoke:Sources | renderSource | Q20750516}}', '<span class="wikidata_cite citetype_Q2061228" data-entity-id="Q20750516">[[:ru:s:Указ Президента РФ от 15.01.1992 № 23|Указ Президента Российской Федерации от&nbsp;15&nbsp;января 1992&nbsp;г. №&nbsp;23 «О Генеральном директоре Агентства федеральной безопасности Российской Федерации и Министре внутренних дел Российской Федерации»]] — 1992.</span>')
    self:preprocess_equals('{{#invoke:Sources | renderSource | Q21683979}}', '<span class="wikidata_cite citetype_unknown" data-entity-id="Q21683979">[https://tools.wmflabs.org/reasonator/?q=Q21683979&lang=ru Advances in Cryptology — EUROCRYPT 2004]: International Conference on the Theory and Applications of Cryptographic Techniques, Interlaken, Switzerland, May 2-6, 2004. Proceedings — [[:Интерлакен|Interlaken]]: [[:Springer Science+Business Media|Springer Science+Business Media]], 2004. — Vol.&nbsp;3027. — 628&nbsp;p. — ISBN 978-3-540-21935-4</span>')
    self:preprocess_equals('{{#invoke:Sources | renderSource | Q21683981}}', '<span class="wikidata_cite citetype_Q13442814" data-entity-id="Q21683981">\'\'[https://tools.wmflabs.org/reasonator/?q=Q21683980&lang=ru Nguyen&nbsp;P.&nbsp;Q.]\'\' [http://www.di.ens.fr/~pnguyen/pub_Ng04.htm Can We Trust Cryptographic Software? Cryptographic Flaws in GNU Privacy Guard v1.2.3] // \'\'[https://tools.wmflabs.org/reasonator/?q=Q21683979&lang=ru Advances in Cryptology — EUROCRYPT 2004]\'\': \'\'International Conference on the Theory and Applications of Cryptographic Techniques, Interlaken, Switzerland, May 2-6, 2004. Proceedings\'\' — [[:Интерлакен|Interlaken]]: [[:Springer Science+Business Media|Springer Science+Business Media]], 2004. — Vol.&nbsp;3027. — P.&nbsp;555—570. — 628&nbsp;p. — ([[:en:Lecture Notes in Computer Science|Lecture Notes in Computer Science]]) — ISBN 978-3-540-21935-4 — ISSN 0302-9743 — [http://dx.doi.org/10.1007/978-3-540-24676-3_33 doi:10.1007/978-3-540-24676-3_33]</span>')
    self:preprocess_equals('{{#invoke:Sources | renderSource | Q21725400}}', '<span class="wikidata_cite citetype_Q13442814" data-entity-id="Q21725400">\'\'[https://tools.wmflabs.org/reasonator/?q=Q21725397&lang=ru Eichenauer&nbsp;J.], [https://tools.wmflabs.org/reasonator/?q=Q15401589&lang=ru Lehn&nbsp;J.]\'\' [https://tools.wmflabs.org/reasonator/?q=Q21725400&lang=ru A non-linear congruential pseudo random number generator] // \'\'[https://tools.wmflabs.org/reasonator/?q=Q15750834&lang=ru Statistische Hefte]\'\' — [https://tools.wmflabs.org/reasonator/?q=Q21587985&lang=ru Springer Berlin Heidelberg], 1986. — Vol.&nbsp;27, Iss.&nbsp;1. — P.&nbsp;315—326. — ISSN 0932-5026 — [http://dx.doi.org/10.1007/BF02932576 doi:10.1007/BF02932576]</span>')
end

return p