Module:Authority control/testcases

From MOASSpedia
Jump to navigation Jump to search

Documentation for this module may be created at Module:Authority control/testcases/doc

-- Unit tests for [[Module:Authority control]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_authority_control()

    self:preprocess_equals('{{Authority control/sandbox|VIAF=59263727 |LCCN=n/79/113947 |ISNI=0000 0000 8138 6064 |GND=119408643 |BNF=13746617f |MBA=9dd93d09-24b4-41f1-a48b-ef48b07499c3}}','<table cellspacing="0" class="navbox" style="border-spacing:0;"><tr><td style="padding:2px;"><table cellspacing="0" class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit;"><tr><th scope="row" class="navbox-group">[[Authority control]]</th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;">\n*  [http://www.worldcat.org/identities/lccn-n79-113947 WorldCat]\n* [[Virtual International Authority File|VIAF]]: <span class="uid">[http://viaf.org/viaf/59263727 59263727]</span>\n* [[Library of Congress Control Number|LCCN]]: <span class="uid">[http://id.loc.gov/authorities/names/n79113947 n79113947]</span>\n* [[International Standard Name Identifier|ISNI]]: <span class="uid">[http://isni-url.oclc.nl/isni/0000000081386064 0000 0000 8138 6064]</span>\n* [[Integrated Authority File|GND]]: <span class="uid">[http://d-nb.info/gnd/119408643 119408643]</span>\n* [[Bibliothèque nationale de France|BNF]]: <span class="uid">[http://catalogue.bnf.fr/ark:/12148/cb13746617f cb13746617f]</span>\n* [[MusicBrainz]]: <span class="uid">[https://musicbrainz.org/artist/9dd93d09-24b4-41f1-a48b-ef48b07499c3 9dd93d09-24b4-41f1-a48b-ef48b07499c3]</span>\n</div></td></tr></table></td></tr></table>')

    self:preprocess_equals('{{Authority control/sandbox|VIAF=66861474 |LCCN=n/87/142671 |ISNI=0000 0001 0911 2808 |GND=117421863 }}','<table cellspacing="0" class="navbox" style="border-spacing:0;"><tr><td style="padding:2px;"><table cellspacing="0" class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit;"><tr><th scope="row" class="navbox-group">[[Authority control]]</th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;">\n*  [http://www.worldcat.org/identities/lccn-n87-142671 WorldCat]\n* [[Virtual International Authority File|VIAF]]: <span class="uid">[http://viaf.org/viaf/66861474 66861474]</span>\n* [[Library of Congress Control Number|LCCN]]: <span class="uid">[http://id.loc.gov/authorities/names/n87142671 n87142671]</span>\n* [[International Standard Name Identifier|ISNI]]: <span class="uid">[http://isni-url.oclc.nl/isni/0000000109112808 0000 0001 0911 2808]</span>\n* [[Integrated Authority File|GND]]: <span class="uid">[http://d-nb.info/gnd/117421863 117421863]</span>\n</div></td></tr></table></td></tr></table>')

    self:preprocess_equals('{{Authority control/sandbox|GND=11857308X|LCCN=n/79/6779|VIAF=76349832|ULAN=500344436}}','<table cellspacing="0" class="navbox" style="border-spacing:0;"><tr><td style="padding:2px;"><table cellspacing="0" class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit;"><tr><th scope="row" class="navbox-group">[[Authority control]]</th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;">\n*  [http://www.worldcat.org/identities/lccn-n79-6779 WorldCat]\n* [[Virtual International Authority File|VIAF]]: <span class="uid">[http://viaf.org/viaf/76349832 76349832]</span>\n* [[Library of Congress Control Number|LCCN]]: <span class="uid">[http://id.loc.gov/authorities/names/n79006779 n79006779]</span>\n* [[Integrated Authority File|GND]]: <span class="uid">[http://d-nb.info/gnd/11857308X 11857308X]</span>\n* [[Union List of Artist Names|ULAN]]: <span class="uid">[http://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid=500344436 500344436]</span>\n</div></td></tr></table></td></tr></table>')

    self:preprocess_equals('{{Authority control/sandbox|VIAF=59263727|LCCN=n/79/113947|ISNI=0000 0000 8138 6064|GND=119408643|BNF=13746617f|MBA=9dd93d09-24b4-41f1-a48b-ef48b07499c3}}','<table cellspacing="0" class="navbox" style="border-spacing:0;"><tr><td style="padding:2px;"><table cellspacing="0" class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit;"><tr><th scope="row" class="navbox-group">[[Authority control]]</th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;">\n*  [http://www.worldcat.org/identities/lccn-n79-113947 WorldCat]\n* [[Virtual International Authority File|VIAF]]: <span class="uid">[http://viaf.org/viaf/59263727 59263727]</span>\n* [[Library of Congress Control Number|LCCN]]: <span class="uid">[http://id.loc.gov/authorities/names/n79113947 n79113947]</span>\n* [[International Standard Name Identifier|ISNI]]: <span class="uid">[http://isni-url.oclc.nl/isni/0000000081386064 0000 0000 8138 6064]</span>\n* [[Integrated Authority File|GND]]: <span class="uid">[http://d-nb.info/gnd/119408643 119408643]</span>\n* [[Bibliothèque nationale de France|BNF]]: <span class="uid">[http://catalogue.bnf.fr/ark:/12148/cb13746617f cb13746617f]</span>\n* [[MusicBrainz]]: <span class="uid">[https://musicbrainz.org/artist/9dd93d09-24b4-41f1-a48b-ef48b07499c3 9dd93d09-24b4-41f1-a48b-ef48b07499c3]</span>\n</div></td></tr></table></td></tr></table>')

    self:preprocess_equals('{{Authority control/sandbox|VIAF=7524651|PND=118650130|LCCN=n/79/4182}}','<table cellspacing="0" class="navbox" style="border-spacing:0;"><tr><td style="padding:2px;"><table cellspacing="0" class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit;"><tr><th scope="row" class="navbox-group">[[Authority control]]</th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;">\n*  [http://www.worldcat.org/identities/lccn-n79-4182 WorldCat]\n* [[Virtual International Authority File|VIAF]]: <span class="uid">[http://viaf.org/viaf/7524651 7524651]</span>\n* [[Library of Congress Control Number|LCCN]]: <span class="uid">[http://id.loc.gov/authorities/names/n79004182 n79004182]</span>\n* [[Integrated Authority File|GND]]: <span class="uid">[http://d-nb.info/gnd/118650130 118650130]</span>\n</div></td></tr></table></td></tr></table>')

    self:preprocess_equals('{{Authority control/sandbox|VIAF=71392434|LCCN=n/80/057246|GND=118555081|SELIBR=242878}}','<table cellspacing="0" class="navbox" style="border-spacing:0;"><tr><td style="padding:2px;"><table cellspacing="0" class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit;"><tr><th scope="row" class="navbox-group">[[Authority control]]</th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;">\n*  [http://www.worldcat.org/identities/lccn-n80-057246 WorldCat]\n* [[Virtual International Authority File|VIAF]]: <span class="uid">[http://viaf.org/viaf/71392434 71392434]</span>\n* [[Library of Congress Control Number|LCCN]]: <span class="uid">[http://id.loc.gov/authorities/names/n80057246 n80057246]</span>\n* [[Integrated Authority File|GND]]: <span class="uid">[http://d-nb.info/gnd/118555081 118555081]</span>\n* [[LIBRIS]]: <span class="uid">[http://libris.kb.se/auth/242878 242878]</span>\n</div></td></tr></table></td></tr></table>')

    self:preprocess_equals('{{Authority control/sandbox|VIAF=75121530|NLA=36582360|ULAN=500240971|SELIBR=184709|PND=118529579|LCCN=n/79/22889|RID=I-6013-2012|TSURL=Albert_Einstein|BNF=cb119016075|ISNI=000000012281955X}}','<table cellspacing="0" class="navbox" style="border-spacing:0;"><tr><td style="padding:2px;"><table cellspacing="0" class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit;"><tr><th scope="row" class="navbox-group">[[Authority control]]</th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;">\n*  [http://www.worldcat.org/identities/lccn-n79-22889 WorldCat]\n* [[Virtual International Authority File|VIAF]]: <span class="uid">[http://viaf.org/viaf/75121530 75121530]</span>\n* [[Library of Congress Control Number|LCCN]]: <span class="uid">[http://id.loc.gov/authorities/names/n79022889 n79022889]</span>\n* [[International Standard Name Identifier|ISNI]]: <span class="uid">[http://isni-url.oclc.nl/isni/000000012281955X 0000 0001 2281 955X]</span>\n* [[Integrated Authority File|GND]]: <span class="uid">[http://d-nb.info/gnd/118529579 118529579]</span>\n* [[LIBRIS]]: <span class="uid">[http://libris.kb.se/auth/184709 184709]</span>\n* [[Bibliothèque nationale de France|BNF]]: <span class="uid">[http://catalogue.bnf.fr/ark:/12148/cb119016075 cb119016075]</span>\n* [[ResearcherID]]: <span class="uid">[http://www.researcherid.com/rid/I-6013-2012 I-6013-2012]</span>\n* [[Union List of Artist Names|ULAN]]: <span class="uid">[http://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid=500240971 500240971]</span>\n</div></td></tr></table></td></tr></table>')

    self:preprocess_equals('{{Authority control/sandbox|PND=118588370|LCCN=n/81/147736|VIAF=39483748|TSURL=viaf/39483748}}','<table cellspacing="0" class="navbox" style="border-spacing:0;"><tr><td style="padding:2px;"><table cellspacing="0" class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit;"><tr><th scope="row" class="navbox-group">[[Authority control]]</th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;">\n*  [http://www.worldcat.org/identities/lccn-n81-147736 WorldCat]\n* [[Virtual International Authority File|VIAF]]: <span class="uid">[http://viaf.org/viaf/39483748 39483748]</span>\n* [[Library of Congress Control Number|LCCN]]: <span class="uid">[http://id.loc.gov/authorities/names/n81147736 n81147736]</span>\n* [[Integrated Authority File|GND]]: <span class="uid">[http://d-nb.info/gnd/118588370 118588370]</span>\n</div></td></tr></table></td></tr></table>')

    self:preprocess_equals('{{Authority control/sandbox|LCCN=n/78/090836}}','<table cellspacing="0" class="navbox" style="border-spacing:0;"><tr><td style="padding:2px;"><table cellspacing="0" class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit;"><tr><th scope="row" class="navbox-group">[[Authority control]]</th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;">\n*  [http://www.worldcat.org/identities/lccn-n78-090836 WorldCat]\n* [[Library of Congress Control Number|LCCN]]: <span class="uid">[http://id.loc.gov/authorities/names/n78090836 n78090836]</span>\n</div></td></tr></table></td></tr></table>')

end

return p