Ҳуҷҷатгузорӣ
-- 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_Q1143604" 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"> / [[:d:Q21683983|C.&nbsp;Cachin]], [[:d:Q21683986|J.&nbsp;L.&nbsp;Camenisch]] — [[:Интерлакен|Interlaken]]: [[:d:Q27980095|Springer-Verlag Berlin Heidelberg]], 2004. — 630&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/b97182 doi:10.1007/b97182]</span></span><div style="display:none"><a href="https://wikidata.org/wiki/Track:Q924044"></a><a href="https://wikidata.org/wiki/Track:Q21683986"></a><a href="https://wikidata.org/wiki/Track:Q21683983"></a><a href="https://wikidata.org/wiki/Track:Q21683979"></a><a href="https://wikidata.org/wiki/Track:Q27980095"></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"> / [[:d:Q21683983|C.&nbsp;Cachin]], [[:d:Q21683986|J.&nbsp;L.&nbsp;Camenisch]] — [[:Интерлакен|Interlaken]]: [[:d:Q27980095|Springer-Verlag Berlin Heidelberg]], 2004. — P.&nbsp;555–570. — 630&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:Q27980095"></a><a href="https://wikidata.org/wiki/Track:Q21683980"></a><a href="https://wikidata.org/wiki/Track:Q21683983"></a><a href="https://wikidata.org/wiki/Track:Q21683986"></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>')
    self:preprocess_equals('{{#invoke:Sources | renderSource | Q21725116}}', '<span class="wikidata_cite citetype_Q571" data-entity-id="Q21725116"><i class="wef_low_priority_links">[[:en:Alfred Menezes|Menezes&nbsp;A.&nbsp;J.]], [[:en:Paul van Oorschot|Oorschot&nbsp;P.&nbsp;v.]], [[:en:Scott Vanstone|Vanstone&nbsp;S.&nbsp;A.]]</i> [http://www.cacr.math.uwaterloo.ca/hac/ Handbook of Applied Cryptography]<span class="wef_low_priority_links"> — [[:CRC Press|CRC Press]], 1996. — 816&nbsp;p. — ([[:d:Q27123086|Discrete Mathematics and Its Applications]]) — ISBN 0-8493-8523-7</span></span><div style="display:none"><a href="https://wikidata.org/wiki/Track:Q27123086"></a><a href="https://wikidata.org/wiki/Track:Q4723156"></a><a href="https://wikidata.org/wiki/Track:Q15262410"></a><a href="https://wikidata.org/wiki/Track:Q954828"></a><a href="https://wikidata.org/wiki/Track:Q21725116"></a><a href="https://wikidata.org/wiki/Track:Q7437437"></a></div>')
    self:preprocess_equals('{{#invoke:Sources | renderSource | Q27450585}}', '<span class="wikidata_cite citetype_Q571" data-entity-id="Q27450585">[[:d:Q27450585|Введение в криптографию]]<span class="wef_low_priority_links"> / под ред. [[:d:Q27450568|В.&nbsp;В.&nbsp;Ященко]] — <span title="Москва" style="border-bottom: 1px dotted; cursor: help; white-space: nowrap">М.</span>: [[:Московский центр непрерывного математического образования|МЦНМО]], 2000. — 271&nbsp;с. — ISBN 5-900916-26-X</span></span><div style="display:none"><a href="https://wikidata.org/wiki/Track:Q27450568"></a><a href="https://wikidata.org/wiki/Track:Q27450585"></a></div>')
end

return p