2 of 2 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
![]() | grc|Aristotle|History of Animals|486|a | Των περί τα ζώα ιστοριών/1#p486a | <div class="wiktQuote" data-validation="orange">'''384 <small class='ce-date'>[[Appendix:Glossary#BCE|<span title="Glossary and display preference">BCE</span>]]</small> – 322 <small class='ce-date'>[[Appendix:Glossary#BCE|<span title="Glossary and display preference">BCE</span>]]</small>''', [[w:Aristotle|Aristotle]], ''[[w:History of Animals|History of Animals]]'' [[s:el:Των περί τα ζώα ιστοριών/#p486a|486a]]</div> |
![]() | grc|Aristotle|History of Animals|486|a|5 | Των περί τα ζώα ιστοριών/1#p486a | <div class="wiktQuote" data-validation="orange">'''384 <small class='ce-date'>[[Appendix:Glossary#BCE|<span title="Glossary and display preference">BCE</span>]]</small> – 322 <small class='ce-date'>[[Appendix:Glossary#BCE|<span title="Glossary and display preference">BCE</span>]]</small>''', [[w:Aristotle|Aristotle]], ''[[w:History of Animals|History of Animals]]'' [[s:el:Των περί τα ζώα ιστοριών/#p486a.5|486a.5]]</div> |
local tests = require('Module:UnitTests')
local examples = {
{ {"grc", "Aristotle", "History of Animals", "486", "a", nil}, "Των περί τα ζώα ιστοριών/1#p486a"},
{ {"grc", "Aristotle", "History of Animals", "486", "a", "5"}, "Των περί τα ζώα ιστοριών/1#p486a"},
}
function tests:test()
self:iterate(examples, function(self, parameters, title_and_fragment)
local generated_title_and_fragment = require("Module:Quotations").Create(parameters)
self:equals(
"<code>" .. mw.text.nowiki(table.concat(parameters, "|")) .. "</code>",
generated_title_and_fragment,
title_and_fragment)
end)
end
return tests