وحدة:Sources/اختبار

من أرابيكا، الموسوعة الحرة
اذهب إلى التنقل اذهب إلى البحث
-- Unit tests for [[Module:Sources]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_Sources()
    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 «О Генеральном директоре Агентства федеральной безопасности Российской Федерации и Министре внутренних дел Российской Федерации»]]<span class="wef_low_priority_links"> — 1992.</span></span><div style="display:none"><a href="https://wikidata.org/wiki/Track:Q20750516"></a></div>')
    self:preprocess_equals('{{#invoke:Sources | renderSource | Q21683979}}', '<span class="wikidata_cite citetype_unknown" data-entity-id="Q21683979">[[:d:Q21683979|Advances in Cryptology — EUROCRYPT 2004]]: International Conference on the Theory and Applications of Cryptographic Techniques, Interlaken, Switzerland, May 2-6, 2004. Proceedings<span class="wef_low_priority_links"> — [[:Интерлакен|Interlaken]]: [[:Springer Science+Business Media|Springer Science+Business Media]], 2004. — 628&nbsp;p. — ISBN 978-3-540-21935-4</span></span><div style="display:none"><a href="https://wikidata.org/wiki/Track:Q176916"></a><a href="https://wikidata.org/wiki/Track:Q21683979"></a><a href="https://wikidata.org/wiki/Track:Q68103"></a></div>')
    self:preprocess_equals('{{#invoke:Sources | renderSource | Q21683981}}', '<span class="wikidata_cite citetype_Q13442814" data-entity-id="Q21683981"><i class="wef_low_priority_links">[[:d:Q21683980|Nguyen&nbsp;P.&nbsp;Q.]]</i> [http://www.di.ens.fr/~pnguyen/pub_Ng04.htm Can We Trust Cryptographic Software? Cryptographic Flaws in GNU Privacy Guard v1.2.3] // \'\'[[:d:Q21683979|Advances in Cryptology — EUROCRYPT 2004]]\'\': \'\'International Conference on the Theory and Applications of Cryptographic Techniques, Interlaken, Switzerland, May 2-6, 2004. Proceedings\'\'<span class="wef_low_priority_links"> — [[:Интерлакен|Interlaken]]: [[:Springer Science+Business Media|Springer Science+Business Media]], 2004. — P.&nbsp;555—570. — 628&nbsp;p. — ([[:en:Lecture Notes in Computer Science|Lecture Notes in Computer Science]]; Vol.&nbsp;3027) — ISBN 978-3-540-21935-4 — ISSN [https://www.worldcat.org/issn/0302-9743 0302-9743] — [http://dx.doi.org/10.1007/978-3-540-24676-3_33 doi:10.1007/978-3-540-24676-3_33]</span></span><div style="display:none"><a href="https://wikidata.org/wiki/Track:Q21683980"></a><a href="https://wikidata.org/wiki/Track:Q176916"></a><a href="https://wikidata.org/wiki/Track:Q924044"></a><a href="https://wikidata.org/wiki/Track:Q21683979"></a><a href="https://wikidata.org/wiki/Track:Q21683981"></a><a href="https://wikidata.org/wiki/Track:Q68103"></a></div>')
    self:preprocess_equals('{{#invoke:Sources | renderSource | Q21725400}}', '<span class="wikidata_cite citetype_Q13442814" data-entity-id="Q21725400"><i class="wef_low_priority_links">[[:d:Q21725397|Eichenauer&nbsp;J.]], [[:d:Q15401589|Lehn&nbsp;J.]]</i> [[:d:Q21725400|A non-linear congruential pseudo random number generator]] // \'\'[[:d:Q15750834|Statistische Hefte]]\'\'<span class="wef_low_priority_links"> — [[:d:Q21587985|Springer Berlin Heidelberg]], 1986. — Vol.&nbsp;27, Iss.&nbsp;1. — P.&nbsp;315—326. — ISSN [https://www.worldcat.org/issn/0932-5026 0932-5026] — [http://dx.doi.org/10.1007/BF02932576 doi:10.1007/BF02932576]</span></span><div style="display:none"><a href="https://wikidata.org/wiki/Track:Q21725400"></a><a href="https://wikidata.org/wiki/Track:Q15401589"></a><a href="https://wikidata.org/wiki/Track:Q21587985"></a><a href="https://wikidata.org/wiki/Track:Q15750834"></a><a href="https://wikidata.org/wiki/Track:Q21725397"></a></div>')
end

return p