Difference between revisions of "Module:Citation/CS1/testcases2"

From blackwiki
Jump to navigation Jump to search
test>Plastikspork
m (Fix double location =)
m (2 revisions imported)
 
(37 intermediate revisions by 6 users not shown)
Line 1: Line 1:
-- Unit tests for [[Module:Citation/CS1]]. Click talk page to run tests.
+
--[=[
local p = require('Module:UnitTests/sandbox')
+
Unit tests for [[Module:Citation/CS1]] error messages. This is not intended to test every possible thing that
 +
can make an error message; rather, it is to test the creation and rendering of the messages themselves.
  
function p:test_encyclopedia()
+
Click talk page to run tests.
    self:preprocess_equals_preprocess_many('{{cite encyclopedia/new|', '}}', '{{cite encyclopedia|', '}}', {
+
 
      {
+
]=]
[==[
+
 
last= LAST
+
local p = require('Module:UnitTests')
|first= FIRST
+
 
|authorlink= AUTHORLINK
+
--[[--------------------------< W I K I L I N K _ I N _ U R L >------------------------------------------------
|editor-first= EDITOR-FIRST
+
]]
|editor-last= EDITOR-LAST
+
 
|editor-link= EDITOR-LINK
+
function p:test_wikilink_in_url()
|encyclopedia= ENCYCLOPEDIA
+
    self:preprocess_equals_preprocess_many(
|title= TITLE
+
    '{{cite journal/new |journal=Journal |', '}}', '{{cite journal |journal=Journal |', '}}',
|trans_title= TRANS_TITLE
+
{
|url= URL
+
{'title=Title |url=//example.com |title-link=Title'}, -- citation0()
|accessdate= ACCESSDATE
+
{'pmc=12345 |title=Title |url=//example.com |title-link=Title'}, -- citation0()
|language= LANGUAGE
+
{'title=[[Title]] |url=//example.com'}, -- safe_for_url()
|edition= EDITION
+
},
|date= DATE
+
{nowiki=false, templatestyles=true}
|year= YEAR
+
)
|month= MONTH
 
|publisher= PUBLISHER
 
|volume= VOLUME
 
|location= LOCATION
 
|id= ID
 
|isbn= ISBN
 
|oclc= OCLC
 
|doi= 10.DOI
 
|pages= PAGES
 
|quote= QUOTE
 
|ref= REF
 
]==]
 
},{
 
[==[
 
  last =Golden
 
  |first = Peter B.
 
  |authorlink =Peter Benjamin Golden
 
  |editor1-last = Golden
 
  |editor1-first = Peter B.
 
  |editor1-link = Peter Benjamin Golden
 
  |editor2-last =  Ben-Shammai,
 
  |editor2-first = Haggai
 
  |editor3-last = Róna-Tas
 
  |editor3-first = András
 
  |editor3-link = András Róna-Tas
 
  |encyclopedia =  The World of the Khazars: New Perspectives
 
  |title = Khazar Studies: Achievements and Perspectives
 
  |series = Handbook of Oriental Studies
 
  |volume = 17
 
  |publisher = BRILL
 
  |year = 2007a
 
  |pages = 7–57
 
  |isbn = 978-9-004-16042-2
 
  |url = http://books.google.com/books?id=3ZzXjdyK-CEC&pg=PR2#v=onepage&p=123
 
  |accessdate = February 13, 2013
 
  |ref = harv
 
]==]
 
}, {
 
[==[
 
title=Idaho – MSN Encarta <!-- BOT GENERATED TITLE -->|url=http://encarta.msn.com/encyclopedia_761565515/Idaho.html | archiveurl=http://www.webcitation.org/query?id=1257036681681058 | archivedate=2009-11-01|deadurl=yes
 
]==]
 
}, {
 
[==[
 
url= http://encarta.msn.com/encyclopedia_761594679/martina_hingis.html | title=Martina Hingis | publisher=[[Encarta]] | accessdate=31 October 2008 | archiveurl=http://www.webcitation.org/5kx7RAO3G | archivedate=1 November 2009|deadurl=yes
 
]==]
 
}, {
 
[==[
 
archiveurl=http://www.webcitation.org/5kwbxqnne | deadurl=yes | archivedate=31 October 2009 | title=Europe | last=Microsoft Encarta Online Encyclopaedia 2007 | url=http://encarta.msn.com/encyclopaedia_761570768/Europe.html | accessdate=27 December 2007
 
]==]
 
}, {
 
[==[
 
last=Seberg |first=Ole |year=2007 |editor-last=Heywood |editor-first=Vernon H. |editor2-last=Brummitt |editor2-first=Richard K. |editor3-last=Culham |editor3-first=Alastair |contribution=Alliaceae |title=Flowering Plant Families of the World |pages=340–341 |publication-place=Richmond Hill, Ontario |publisher=Firefly Books |isbn=978-1-55407-206-4 |lastauthoramp=yes
 
]==]
 
}, {
 
[==[
 
chapter=Lewinsky scandal |title=The Columbia Encyclopedia, Sixth Edition |publisher=Columbia University Press |year=2008 |url=http://www.encyclopedia.com/topic/Lewinsky_scandal.aspx |accessdate=February 9, 2010
 
]==]
 
}, {
 
[==[
 
last = Gerish | first = Deborah | title = Aimery of Lusignan | editor = Alan V. Murray | encyclopedia = The Crusades: An Encyclopedia | volume = 1 | pages = 24 | publisher = [[ABC-CLIO]] | location = [[Santa Barbara, California|Santa Barbara]] | year = 2006 | url = http://books.google.com/books?id=6cSXSgAACAAJ | oclc = 70122512
 
]==]
 
}, {
 
[==[
 
author=Skousen, Royal | authorlink=Royal Skousen | title=Book of Mormon Editions (1830-1981) | encyclopedia=[[Encyclopedia of Mormonism]] | year=1992 | volume=1 | pages=175–6 | publisher=[[Macmillan Publishers (United States)|Macmillan]] | url=http://eom.byu.edu/index.php/Book_of_Mormon_Editions_(1830-1981) | accessdate=2009-02-12 | ref=harv
 
]==]
 
}, {
 
[==[
 
  last = Morère
 
  | first = J. E.
 
  | title = Aguilon, François d'
 
  | encyclopedia = [[Dictionary of Scientific Biography]]
 
  | volume = 1
 
  | pages = 81
 
  | publisher = Charles Scribner's Sons
 
  | location = New York
 
  | year = 1970
 
  | isbn = 0-684-10114-9
 
]==]
 
}, {
 
[==[
 
  title = Clipper
 
  | encyclopedia = New International Encyclopaedia
 
  | volume = 5
 
  | pages = 39
 
  | publisher = Dodd Mead and Company
 
  | year = 1909
 
  | quote = Clipper ... probably connected with Dutch ''klepper'', fast horse
 
  | url =  http://books.google.com/?id=qycVAAAAYAAJ&dq=%22clipper%20ship%22&pg=PA39#v=onepage
 
  | accessdate =6 Mar. 2010
 
]==]
 
}, {
 
[==[
 
last= Smith |first= Peter |encyclopedia= A concise encyclopedia of the Bahá'í Faith |title= satan |year= 2000 |publisher=Oneworld Publications |location= Oxford |isbn= 1-85168-184-1 |pages= 304
 
]==]
 
}, {
 
[==[
 
chapter=Ethanol|title=[[#Encyc Chem|Encyclopedia of chemical technology]]|year=1991|page=813|volume=9
 
]==]
 
}, {
 
[==[
 
first = William A.
 
| last = Wallace
 
| title = Albertus Magnus, Saint
 
| url = http://www.u.arizona.edu/~aversa/scholastic/Dictionary of%20Scientific%20Biography/Albertus%20Magnus%20(Wallace).pdf
 
| publisher = Scribner & American Council of Learned Societies
 
| isbn = 978-0-684-10114-9
 
| editor-last = Gillispie
 
| editor-first = Charles
 
| encyclopedia = [[Dictionary of Scientific Biography]]
 
| volume=1
 
| pages=99-103
 
| location = New York
 
| year = 1970
 
]==]
 
}, {
 
[==[
 
last=Kukathas |first=Chandran |authorlink=Chandran Kukathas |year=1998 |title=Rand, Ayn (1905–82) |editor-last=Craig |editor-first=Edward (ed) |encyclopedia=[[Routledge Encyclopedia of Philosophy]] |location=New York |publisher=Routledge |volume=8 |pages=55–56 |isbn=0-415-07310-3 |oclc=318280731
 
]==]
 
}, {
 
[==[
 
last=Morse |first=Stephen J. |encyclopedia=Law Library - American Law and Legal Information |title=Psychopathy - What Is Psychopathy? |url=http://law.jrank.org/pages/1884/Psychopathy-What-psychopathy.html |accessdate=2008-09-25 |volume=Crime and Justice Vol 3|archiveurl=http://www.webcitation.org/5b5vnGYP0 |archivedate=2008-09-25
 
]==]
 
}, {
 
[==[
 
last= Smith|first= Peter |encyclopedia= A concise encyclopedia of the Bahá'í Faith|title= burial, "death and afterlife", evil, evil spirits, sin |year= 2000|publisher=Oneworld Publications|location= Oxford |isbn= 1-85168-184-1|pages= 96–97, 118–119, 135–136, 322–323| ref = harv
 
]==]
 
}, {
 
[==[
 
last=Hodges |first=Andrew |editor=Edward N. Zalta |encyclopedia=[[Stanford Encyclopedia of Philosophy]] |title=Alan Turing |url=http://plato.stanford.edu/entries/turing/ |accessdate=10 January 2011 |edition=Winter 2009 |date=27 August 2007 |publisher=[[Stanford University]] |ref=harv
 
]==]
 
}, {
 
[==[
 
editor=[[Pete Palmer]] and Gary Gillette|encyclopedia=The 2005 ESPN Baseball Encyclopedia|title=Introduction|edition=1st Edition|year=2005|publisher=Sterling|location=New York|isbn=1-4027-2568-X
 
]==]
 
}, {
 
[==[
 
first = Ernan
 
| last = McMullin
 
| title = Robert Bellarmine
 
| url = http://www.encyclopedia.com/topic/Robert_Bellarmine.aspx#1
 
| publisher = Scribner & American Council of Learned Societies
 
| editor-last = Gillispie
 
| editor-first = Charles
 
| encyclopedia = [[Dictionary of Scientific Biography]]
 
| year = 2008
 
]==]
 
}, {
 
[==[
 
last= |first= | authorlink= | title=Islam |year=2007| encyclopedia=Encyclopædia Britannica Online | accessdate=2007-11-27|location=|publisher=|url=http://www.britannica.com/eb/article-69190/Islam
 
]==]
 
}, {
 
[==[
 
author=Bliss, Michael |year=2002 |title=Macleod, John James Rickard |url=http://www.thecanadianencyclopedia.com/articles/john-james-rickard-macleod |encyclopedia=Canadian Encyclopedia
 
]==]
 
}, {
 
[==[
 
title=Penderecki, Krzysztof|last=Thomas|first=Adrian|editor-last=Sadie|editor-first=Stanley|location=London, England|year=1992|encyclopedia=[[New Grove Dictionary of Opera]]|ISBN=0-333-73432-7
 
]==]
 
}, {
 
[==[
 
encyclopedia=[[Encyclopedia of Arkansas History & Culture]]|title=Louisiana Purchase|first=Lea Flowers|last=Baker|accessdate=2010-09-18|url=http://encyclopediaofarkansas.net/encyclopedia/entry-detail.aspx?entryID=2383
 
]==]
 
}, {
 
[==[
 
title=Cervantes, Miguel de|encyclopedia=The Encyclopedia Americana|year=1994
 
]==]
 
}, {
 
[==[
 
editor=Robert M. Besançon | encyclopedia=The Encyclopedia of Physics | edition=3rd | year=1990 | publisher=Van Nostrand Reinhold, New York | isbn = 0-442-00522-9 | pages = 1278–1284 | article=Vacuum Techniques
 
]==]
 
}, {
 
[==[
 
last = McFarlane | first = Ian | authorlink = Ian McFarlane | encyclopedia = [[Encyclopedia of Australian Rock and Pop]] | title = Whammo Homepage | url = http://web.archive.org/web/20040405231007/www.whammo.com.au/index.asp | accessdate =4 December 2010 | year = 1999 | publisher=[[Allen & Unwin]] | location = [[St Leonards, New South Wales|St Leonards, NSW]] | isbn = 1-86508-072-1
 
]==]
 
}, {
 
[==[
 
  last = Campbell
 
  | first = J.
 
  | authorlink =
 
  | title = Rædwald
 
  | url = http://www.oxforddnb.com/view/article/23265?docPos=1
 
  | encyclopedia = [[Dictionary of National Biography]]
 
  | year = 2004
 
  | editor-last =
 
  | editor-first =
 
  | editor-link =  
 
  | volume =
 
  | location =
 
  | doi = 10.1093/ref:odnb/23265
 
  | publisher = Oxford University Press
 
]==]
 
}, {
 
[==[
 
title=Avicenna | encyclopedia=Encyclopaedia of Islam Online | ref=harv
 
]==]
 
}, {
 
[==[
 
title=Islam|encyclopedia=Encyclopaedia of Islam Online|author=L. Gardet|coauthors=J. Jomier
 
]==]
 
}, {
 
[==[
 
first=Ted |last=Honderich |authorlink=Ted Honderich |year=2005 |title=theodicy |encyclopedia=The Oxford Companion to Philosophy |isbn=0-19-926479-1 |quote=[[John Hick]], for example, proposes a theodicy, while [[Alvin Plantinga]] formulates a defence. The idea of human free will often appears in a both of these strategies, but in different ways.
 
]==]
 
}, {
 
[==[
 
title=AskOxford Search Results&nbsp;– terrorist |encyclopedia=AskOxford |publisher=AskOxford |accessdate=2008-07-11 | notracking=true
 
]==]
 
}, {
 
[==[
 
title = Virus.VBS.Redlof.a | encyclopedia = Virus Encyclopedia | publisher = Viruslist.com | date = January 15, 2004 | url = http://www.viruslist.com/viruses/encyclopedia?virusid=25409 | accessdate =August 26, 2007
 
]==]
 
}, {
 
[==[
 
title=Matthew, Tobie (1544?–1628)
 
|last=Sheils
 
|first=William Joseph
 
|encyclopedia=Oxford Dictionary of National Biography
 
|publisher=Oxford University Press
 
|year=2004
 
]==]
 
}, {
 
[==[
 
editor = Thomas Hockey et al. | last = Dalen | first = Benno van | title=Ulugh Beg: Muḥammad Ṭaraghāy ibn Shāhrukh ibn Tīmūr | encyclopedia = The Biographical Encyclopedia of Astronomers | publisher=Springer | year = 2007 | location = New York | pages = 1157–9 | url=http://islamsci.mcgill.ca/RASI/BEA/Ulugh_Beg_BEA.htm | isbn=978-0-387-31022-0
 
]==]
 
}, {
 
[==[
 
author=Lawson, M. K. |encyclopedia= The Medieval State: Essays Presented to James Campbell |title=Observations Upon a Scene in the Bayeux Tapestry |publisher=Hambledon Press |location=London |pages=73–92 |year=2000
 
]==]
 
}, {
 
[==[
 
last=Waugh|first=Scott L.|title=Thomas, 1st Earl of Norfolk (1300–1338)|encyclopedia=Oxford Dictionary of National Biography|publisher=Oxford University Press|location=Oxford|year=2004|doi=10.1093/ref:odnb/27196
 
]==]
 
}, {
 
[==[
 
author=Yorke, Philip Chesney|encyclopedia=Encyclopædia Britannica|title=Anne (1665–1714)|publisher=University Press|location=Cambridge|edition=11th|year=1911
 
]==]
 
}, {
 
[==[
 
editor-last = Lewis| editor-first = M. Paul| encyclopedia = Ethnologue: Languages of the World| edition = 16 | publisher = SIL International | location = Dallas, Texas| year = 2009| url = http://www.ethnologue.com/show_language.asp?code=deu
 
]==]
 
}
 
    }, {nowiki=false})
 
 
end
 
end
  
function p:test_news()
 
    self:preprocess_equals_preprocess_many('{{cite news/new|', '}}', '{{cite news|', '}}', {
 
      {
 
[==[
 
  title      = TITLE
 
| author      = AUTHOR
 
| first      = FIRST
 
| last        = LAST
 
| authorlink  = AUTHORLINK
 
| authorlink2 = AUTHORLINK2
 
| author2    = AUTHOR2
 
| author3    = AUTHOR3
 
| author4    = AUTHOR4
 
| author5    = AUTHOR5
 
| author6    = AUTHOR6
 
| author7    = AUTHOR7
 
| url        = URL
 
| format      = FORMAT
 
| agency      = AGENCY
 
| newspaper  = NEWSPAPER
 
| publisher  = PUBLISHER
 
| location    = LOCATION
 
| isbn        = ISBN
 
| issn        = ISSN
 
| oclc        = OCLC
 
| pmid        = PMID
 
| pmc        = PMC
 
| bibcode    = BIBCODE
 
| doi        = 10.DOI
 
| id          = ID
 
| date        = DATE
 
| page        = PAGE
 
| pages      = PAGES
 
| at          = AT
 
| accessdate  = ACCESSDATE
 
| language    = LANGUAGE
 
| trans_title = TRANS_TITLE
 
| quote      = QUOTE
 
| archiveurl  = ARCHIVEURL
 
| archivedate = ARCHIVEDATE
 
| deadurl    = DEADURL
 
| ref        = REF
 
| notracking=true
 
]==] }, {
 
  
[==[ postscript= | title=Auction Record for an Original 'Alice' | url=http://www.nytimes.com/1998/12/11/nyregion/auction-record-for-an-original-alice.html | date=11 December 1998 | periodical=The New York Times | page=B30
+
--[[--------------------------< T E S T _ V A U T H O R S >----------------------------------------------------
]==] }, {
+
]]
  
[==[ last=Rabil | title=New York Times Starts Selling Ad Space on Front Page | url=http://www.bloomberg.com/apps/news?pid=20601103&sid=amsJuEA115pI&refer=us | date=January 5, 2009 | first=Sarah | work=Bloomberg L.P.
+
function p:test_vauthors()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'vauthors=Black ABC'}, -- too many initials
 +
{'vauthors=Black A-B'}, -- hyphenated initials
 +
{'vauthors=Black AB II'}, -- invalid generational suffix - does not show and error but it should
 +
{'vauthors=Black AB 3d'}, -- invalid generational suffix
 +
{'vauthors=Black, AB, Brown, CD'}, -- improper puncutation - does not show and error but it should
 +
{'vauthors=Black AB; Brown CD'}, -- improper puncutation
 +
{'vauthors=Вlack AВ, Вrown CD,'}, -- the 'В's are Cyrillic characters
 +
{'vauthors=Black AB Brown CD'}, -- missing comma
 +
{'vauthors=Black A B'}, -- spaced initials
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[
 
title=Drugs: Chips trader gets 15 years, 10 strokes
 
|url=http://www.dailyexpress.com.my/news.cfm?NewsID=48660
 
|work=Daily Express |location=Kota Kinabalu, Malaysia
 
|date=29 March 2007 |agency=Bernama
 
]==] }, {
 
  
[==[title=Ученый: тунгусская катастрофа связана с водородным взрывом ядра кометы (Scientist: The Tunguska Catastrophe connected to the hydrogen explosion of a comet nucleus)|url=http://ria.ru/science/20090330/166427555.html|accessdate=14 October 2010|newspaper=[[RIA Novosti]]|date=30 March 2009|language=Russian
+
--[[--------------------------< T E S T _ V A N C O U V E R >--------------------------------------------------
]==] }, {
+
]]
  
[==[  publisher=Apple Inc. | title=Statement by Apple's Board of Directors | url=http://www.apple.com/pr/library/2011/10/05Statement-by-Apples-Board-of-Directors.html | accessdate=October 6, 2011
+
function p:test_vancouver()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |name-list-format=vanc |', '}}', '{{cite book |title=Title |name-list-format=vanc |', '}}',
 +
{
 +
{'last=Black |first=AB 3d'}, -- invalid generational suffix - reduce_to_initials()
 +
{'last=Вlack |first=Alpha Вravo'}, -- the 'В's are Cyrillic characters
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  last=Stella | date=14 March 2013 | first=Gian Antonio | title=Tango e battesimo, fidanzata e vangelo l'alfabeto misto di Papa Francesco | newspaper=Corriere della Sera | quote=Mio padre era di Portacomaro (Asti, ndr) e mia madre di Buenos Aires, con sangue piemontese e genovese | url=http://www.corriere.it/esteri/speciali/2013/conclave/notizie/14-mar-papa-tango-fidanzata_1069e952-8c70-11e2-ab2c-711cc67f5f67.shtml | language=Italian | accessdate=14 March 2013
 
]==] }, {
 
  
[==[ archiveurl=http://web.archive.org/web/20051001062114/http://www.cnn.com/2005/WORLD/europe/09/23/ | date=23 September 2005 | publisher=CNN | title=Cardinal breaks conclave vow of secrecy | archivedate=1 October 2005 | agency=Associated Press | url=http://www.cnn.com/2005/WORLD/europe/09/23/conclave.diary.ap/index.html | accessdate=13 March 2013
+
--[[--------------------------< T E S T _ T R A N S _ M I S S I N G _ T I T L E >------------------------------
]==] }, {
+
]]
  
[==[  date=17 March 2013 | author=Miroff, Nick | page=27 | title=Pope's activity in Dirty War Draws Scrutiny | location=Sec. 1 | agency=Washington Post | work=Chicago Tribune | accessdate=17 March 2013|
+
function p:test_trans_missing_title()
notracking=true ]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |', '}}', '{{cite book |', '}}',
 +
{
 +
{'trans-title=Trans Title'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  date=916 | title=Mahdia founded |last=El Fatimi |ref=harv]==] }, {
 
  
[==[ author=[[Benedict Anderson]]|title=In the World-Shadow of Bismarck and Nobel|publisher=[[New Left Review]]|date=July–August 2004|url=http://newleftreview.org/II/28/benedict-anderson-in-the-world-shadow-of-bismarck-and-nobel]==] }, {
+
--[[--------------------------< T E S T _ T E X T _ I G N O R E D >--------------------------------------------
 +
]]
  
[==[  url=http://findarticles.com/p/articles/mi_qa3884/is_200603/ai_n17181949/pg_1?tag=artBody;col1|title=City infrastructures and city dwellers: Accommodating the automobile in twentieth-century Paris|accessdate=3 August 2008|author=Mathieu Flonneau|publisher=The Journal of Transport History | year=2006]==] }, {
+
function p:test_text_ignored()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'text to be ignored'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  url=http://news.bbc.co.uk/1/hi/in_depth/4417096.stm|title=Special Report: Riots in France|date=9 November 2005|accessdate=17 November 2007|publisher=BBC News ]==] }, {
 
  
[==[ url=http://hn.wenweipo.com/news/zhuanti/2012-11-16/23713.html | title=本报独家探访河南邓州习营村 | date=2012-11-16 | publisher=[[Wen Wei Po]] |accessdate=2012-11-156]==] }, {
+
--[[--------------------------< T E S T _ S S R N _ M I S S I N G >--------------------------------------------
 +
]]
  
[==[  url=http://www.nytimes.com/2012/11/16/world/asia/new-chinese-leader-offers-few-hints-of-a-shift-in-direction.html|title=New Chinese Leader Offers Few Hints of a Shift in Direction|first=Ian|last=Johnson|date=2012-11-15|work=The New York Times|accessdate=2012-11-15]==] }, {
+
function p:test_ssrn_missing()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite ssrn/new |title=Title', '}}', '{{cite ssrn |title=Title', '}}',
 +
{
 +
{''},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  first=Jonathan | last=Watts | url=http://www.guardian.co.uk/world/2007/oct/26/china.uknews4 |title=Most corrupt officials are from poor families but Chinese royals have a spirit that is not dominated by money | accessdate=11 June 2008 |work=The Guardian |location=London  |date= 26 October 2007]==] }, {
 
  
[==[ last=Bazar|first=Emily|title=Immigrants Make Pilgrimage to Pope | work=USA Today | date=16 April 2008 | url=http://www.usatoday.com/news/religion/2008-04-15-popeimmigrants_N.htm | accessdate=3 May 2008]==] }, {
+
--[[--------------------------< T E S T _ S C R I P T _ P A R A M E T E R >------------------------------------
 +
]]
  
[==[  author=David Willey |url=http://www.bbc.co.uk/news/world-europe-10645748 |title=Vatican 'speeds up' abuse cases |work=BBC News |date=15 July 2010 |accessdate=28 October 2010]==] }, {
+
function p:test_script_parameter()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'script-title=ja:'}, -- missing title part
 +
{'script-title=ac:script-title'}, -- unknown language code
 +
{'script-title=es:script-title'}, -- invalid language code
 +
{'script-title=script-title'}, -- missing prefix
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ title=The economy of heat |publisher=The Economist |date=2007-04-12 |url=http://www.economist.com/node/8952496?story_id=8952496 |accessdate=2008-06-06]==] }, {
+
--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S >----------------------------
 +
]]
  
[==last=Alves |first=Fabio |last2=Caminada |first2=Carlos |title=Brazilian Debt Raised to Investment Grade by S&P |publisher=Reuters |date=2008-04-30 |url=http://www.bloomberg.com/apps/news?pid=newsarchive&sid=a86v4f6_W2Jg |accessdate=2008-06-09]==] }, {
+
function p:test_redundant_parameters()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'type=Type |meduim=Meduim'}, -- argument_wrapper()
 +
{'last=Last |last1=Last1'}, -- extract_names()
 +
{'last=Last |first=First |first1=First1'}, -- extract_names()
 +
{'last=Last |first=First |author-mask=Author-mask |author-mask1=Author-mask1'}, -- extract_names()
 +
{'last=Last |first=First |author-link=Author |author1-link=Author'}, -- extract_names()
 +
{'vauthors=[[Author|Author AA]] |author-link=Author'}, -- parse_vauthors_veditors()
 +
{'vauthors=Black AB |author2=Brown CD'}, -- select_author_editor_source()
 +
{'page=1 |pages=3, 4'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  author= | title=Gwynne Shotwell: Executive Profile & Biography | url=http://investing.businessweek.com/research/stocks/private/person.asp?personId=39083380& privcapId=7702894& previousCapId=7702894& previousTitle=Space%20Exploration%20Technologies%20Corp | newspaper=Business Week| publisher=Bloomburg | location=New York | date=2011-12-01| accessdate=2011-12-01 | archiveurl=http://www.webcitation.org/63bzdtgbl | deadurl=no | archivedate=2011-12-01]==] }, {
 
  
[==[ first= Irene | last= Klotz | title= SpaceX's Dragon Capsule Returns Safely To Earth|newspaper=Discovery News|publisher=Discovery Communications | location= Silver Spring, Maryland | date=2010-12-08 | url=http://news.discovery.com/space/spacexs-dragon-capsule-returns-safely-to-earth.html |accessdate=2010-12-08|archiveurl=http://www.webcitation.org/63c6KAVeX| archivedate=2011-12-01]==] }, {
+
--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 2 >------------------------
 +
]]
  
[==[  last=Engel|first=Max |title=Launch Market on Cusp of Change |url=http://www.satellitetoday.com/via/satellitegetspersonal/Launch-Market-on-Cusp-of-Change_40648.html |accessdate=2013-02-15 |newspaper=Satellite Today |date=2013-03-01<!-- this is the PUBLICATION date of the newsstand issue; it came online on the internet by 15 Feb, but its stated date is 1 March 2013 --> |quote=''SpaceX is not the first private company to try to break through the commercial space launch market. The company, however, appears to be the real thing. Privately funded, it had a vehicle before it got money from NASA, and while NASA’s space station resupply funds are a tremendous boost, SpaceX would have existed without it.'' ]==] }, {
+
function p:test_redundant_parameters_2()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite mailinglist/new |title=Title |', '}}', '{{cite mailinglist |title=Title |', '}}',
 +
{
 +
{'mailinglist=Mailinglist |work=work'}, -- argument_wrapper()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[title=Bird flu has jumped to baby seals, scientists discover|url=http://edition.cnn.com/2012/07/31/health/baby-seals-avian-flu/index.html?hpt=hp_c4|accessdate=31 July 2012|newspaper=[[CNN]]|date=31 July 2012]==] }, {
 
  
[==[url=http://www.guardian.co.uk/film/2010/mar/10/oscars-farrah-fawcett|title=Farrah Fawcett:Oscars director apologises for 'In Memoriam' omission|work=The Guardian |accessdate=March 8, 2010 | location=London | first=Ben | last=Child | date=March 10, 2010| archiveurl= http://web.archive.org/web/20100414020632/http://www.guardian.co.uk/film/2010/mar/10/oscars-farrah-fawcett| archivedate= April 14, 2010 <!--DASHBot-->| deadurl= no]==] }, {
+
--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 3 >------------------------
 +
]]
  
[==[url=http://latimesblogs.latimes.com/files/2009/02/being-a-member.html |title=Being an Oscar voter *doesn't* mean never having to say you're sorry |accessdate=October 4, 2009 | work=The Los Angeles Times |deadurl=yes]==] }, {
+
function p:test_redundant_parameters_3()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite encyclopedia/new |title=Title |', '}}', '{{cite encyclopedia |title=Title |', '}}',
 +
{
 +
{'encyclopedia=Encyclopedia |work=work'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[author=[[Donald G. McNeil, Jr.]] |coauthors= |title=Precursor to H.I.V. Was in Monkeys for Millennia |url=http://www.nytimes.com/2010/09/17/health/17aids.html?_r=1&src=me&ref=general |quote=Dr. Marx believes that the crucial event was the introduction into Africa of millions of inexpensive, mass-produced syringes in the 1950s.&nbsp;... suspect that the growth of colonial cities is to blame. Before 1910, no Central African town had more than 10,000 people. But urban migration rose, increasing sexual contacts and leading to red-light districts.|work=[[New York Times]] |date=September 16, 2010 |accessdate=2010-09-17 ]==] }, {
 
  
[==[ url=http://news.bbc.co.uk/2/hi/technology/7091190.stm|title=BBC News: History of Technology|date=November 15, 2007]==] }, {
+
--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 4 >------------------------
 +
]]
  
[==[ url = http://findarticles.com/p/articles/mi_hb197/is_200401/ai_n5556112| title = The Story Behind Apple's '1984' TV commercial: Big Brother at 20| accessdate =May 9, 2008| last = Cellini| first = Adelia| month = January | year=2004| work = [[Macworld]] 21.1, page 18| archiveurl = http://web.archive.org/web/20080626112220/| archivedate = June 26, 2008]==] }, {
+
function p:test_redundant_parameters_4()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{citation/new |title=Title |', '}}', '{{citation |title=Title |', '}}',
 +
{
 +
{'encyclopedia=Encyclopedia |work=work'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ last = Spector| first = G| title = Apple's Jobs Starts New Firm, Targets Education Market| work = [[PC Week]]| page = 109| date = September 24, 1985]==] }, {
 
  
[==[ url=http://www.cnn.com/2010/TECH/mobile/06/07/apple.wwdc.preview/index.html | title=Apple unveils iPhone 4, 'biggest leap we've taken' since first model | work=CNN | first1=Brandon |last1=Griggs | first2=John D. |last2= Sutter | date=June 8, 2010 | accessdate=July 5, 2010| archiveurl= http://web.archive.org/web/20100708063056/| archivedate= July 8, 2010 <!--DASHBot-->| deadurl= no]==] }, {
+
--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 5 >------------------------
 +
]]
  
[==[ last=Nichols | date=26 March 2010 | first=Vincent | title=The Church is not trying to cover anything up | url=http://www.timesonline.co.uk/tol/comment/columnists/guest_contributors/article7076344.ece | work=The Times | location=London | accessdate=22 May 2010 ]==] }
+
function p:test_redundant_parameters_5()
    }, {nowiki=false})
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite tech report/new |title=Title |', '}}', '{{cite tech report |title=Title |', '}}',
 +
{
 +
{'number=1 |id=ID'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 
end
 
end
  
function p:test_journal()
 
    self:preprocess_equals_preprocess_many('{{cite journal/new|', '}}', '{{cite journal|', '}}', {
 
      {
 
[==[
 
  last1 = LAST1
 
| first1 = FIRST1
 
| authorlink1 = AUTHORLINK1
 
| last2 = LAST2
 
| first2 = FIRST2
 
| authorlink2 = AUTHORLINK2
 
| editor-last = EDITOR-LAST
 
| editor-first = EDITOR-FIRST
 
| editor-link = EDITOR-LINK
 
| date = DATE
 
| year = YEAR
 
| month = MONTH
 
| title = TITLE
 
| trans_title = TRANS_TITLE
 
| journal = JOURNAL
 
| volume = VOLUME
 
| issue = ISSUE
 
| series = SERIES
 
| pages = PAGES
 
| location = LOCATION
 
| publisher = PUBLISHER
 
| language = LANGUAGE
 
| format = FORMAT
 
| type = TYPE
 
| arxiv = ARXIV
 
| id = ID
 
| isbn = ISBN
 
| issn = ISSN
 
| oclc = OCLC
 
| pmid = PMID
 
| pmc = PMC
 
| bibcode = BIBCODE
 
| doi = 10.DOI
 
| accessdate = ACCESSDATE
 
| url = URL
 
| archiveurl = ARCHIVEURL
 
| archivedate = ARCHIVEDATE
 
| laysource = LAYSOURCE
 
| laysummary = LAYSUMMARY
 
| laydate = LAYDATE
 
| quote = QUOTE
 
| ref = REF
 
| separator = .
 
| postscript = POSTSCRIPT
 
|notracking = true
 
]==] }, {
 
  
[==[
+
--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 6 >------------------------
type=Type | title=Article | format=Format | author=Author | journal=Journal | notracking=true
+
]]
]==] }, {
 
  
[==[
+
function p:test_redundant_parameters_6()
department=Bryan on Scouting | last=Wendell | title=Calendar of New Merit Badges | url=http://blog.scoutingmagazine.org/merit-badge-calendar/ | journal=Scouting | first=Bryan ]==] },{
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite map/new |title=Title |', '}}', '{{cite map |title=Title |', '}}',
 +
{
 +
{'chapter=Chapter |map=Map'}, -- citation0()
 +
{'chapter=Chapter'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[
 
archiveurl=http://wikiwix.com/cache/?url=http%3A%2F%2Fphysics.aps.org%2Farticles%2Fv3%2F98 | date=November 22, 2010 | doi=10.1103/Physics.3.98 | first1=Paul | volume=3 | editor-first=Gene D. | editor-last=Sprouse | url=http://physics.aps.org/articles/v3/98 | issue=98 | journal=Physics | title=Meet a superpartner at the LHC | issn=1943-2879 | publisher=American Physical Society | archivedate=2011-02-22 | oclc=233971234 | location=New York | bibcode=2010PhyOJ...3...98L | last1=Langacker | accessdate=21 February 2011
 
]==] }, {
 
  
[==[ author=Sammy De Grave, N. Dean Pentcheff, Shane T. Ahyong ''et al.'' |year=2009 |title=A classification of living and fossil genera of decapod crustaceans |journal=[[Raffles Bulletin of Zoology]] |volume=Suppl. 21 |pages=1–109 |url=http://rmbr.nus.edu.sg/rbz/biblio/s21/s21rbz1-109.pdf |format=[[Portable Document Format|PDF]]
+
--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 7 >------------------------
 +
]]
  
]==] }, {
+
function p:test_redundant_parameters_7()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite episode/new |title=Title |series=Series |', '}}', '{{cite episode |title=Title |series=Series |', '}}',
 +
{
 +
{'season=Season |series-no=Series number'}, -- citation0()
 +
{'minutes=Minutes |time=Time'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author=Tin-Yam Chan |year=2010 |chapter=Annotated checklist of the world's marine lobsters (Crustacea: Decapoda: Astacidea, Glypheidea, Achelata, Polychelida) |editor=Martyn E. Y. Low and S. H. Tan |title=Annotated checklist of anomuran decapod crustaceans of the world (exclusive of the Kiwaoidea and families Chirostylidae and Galatheidae of the Galatheoidea) and marine lobsters of the world |journal=[[Zootaxa]] |volume=Suppl. 23 |pages=153–181 |url=http://rmbr.nus.edu.sg/rbz/biblio/s23/s23rbz153-181.pdf |format=[[Portable Document Format|PDF]]
 
  
]==] }, {
+
--[[--------------------------< T E S T _ P A R A M E T E R _ I G N O R E D _ S U G G E S T >------------------
 +
]]
  
[==[ last=Frątczak|first=Sławomir Z.|language=Polish | url=http://www.glos.com.pl/Archiwum_nowe/Rok+2005/032/strona/Cud.html | archiveurl=http://web.archive.org/web/20070708173639/ | archivedate=2007-07-08 | journal=[[Głos (1991)|Głos]]|issue=32/2005 | year=2005 | title=Cud nad Wisłą|accessdate=June 18, 2006
+
function p:test_parameter_ignored_suggest()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'Chapter=Chapter'}, -- citation() - case
 +
{'pulbisher=Pulbisher'}, -- citation() – misspelled pattern matched
 +
{'pub=Publisher'}, -- citation() – explicit match
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
]==] }, {
 
  
[==[ author= |title=The fourth report on the diagnosis, evaluation, and treatment of high blood pressure in children and adolescents |journal=Pediatrics |volume=114 |issue=2 Suppl 4th Report |pages=555–76|year=2004 |month=August |pmid=15286277 |doi= 10.1542/peds.114.2.S2.555|url= |author1= National High Blood Pressure Education Program Working Group on High Blood Pressure in Children and Adolescents
+
--[[--------------------------< T E S T _ P A R A M E T E R _ I G N O R E D >----------------------------------
 +
]]
  
]==] }, {
+
function p:test_parameter_ignored()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'unknown=unknown'}, -- citation()
 +
{'encyclopedia=Encyclopedia'}, -- citation0() – |encyclopedia= only available in {{cite encyclopdia}} and {{citation}}
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author=Milazzo S, Ernst E, Lejeune S, Schmidt K |title=Laetrile treatment for cancer |journal=Cochrane Database Syst Rev |issue=2 |pages=CD005476 |year=2006 |pmid=16625640 |doi=10.1002/14651858.CD005476.pub2 |editor1-last=Milazzo |editor1-first=Stefania
 
  
]==] }, {
+
--[[--------------------------< T E S T _ P A R A M E T E R _ I G N O R E D _ 2 >------------------------------
 +
]]
  
[==[ author=M. F. Land |title=Superposition images are formed by reflection in the eyes of some oceanic decapod Crustacea |journal=[[Nature (journal)|Nature]] |year=1976 |volume=263 |pages=764–765 |doi=10.1038/263764a0 |pmid=995187 |issue=5580
+
function p:test_parameter_ignored_2()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite ssrn/new |title=Title |ssrn=123456 |', '}}', '{{cite ssrn |title=Title |ssrn=123456 |', '}}',
 +
{
 +
{'pulbisher=Pulbisher'}, -- citation() – misspelled pattern matched but suggested param not supported by this template
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author=Dale Tshudy & Loren E. Babcock |year=1997 |title=Morphology-based phylogenetic analysis of the clawed lobsters (family Nephropidae and the new family Chilenophoberidae) |journal=[[Journal of Crustacean Biology]] |volume=17 |issue=2 |pages=253–263 |jstor=1549275
 
]==] }, {
 
  
[==[ author=M. Kottek|coauthors=J. Grieser, C. Beck, B. Rudolf, and F. Rubel|title=World Map of the Köppen-Geiger climate classification updated|journal=Meteorol. Z.|volume=15|pages=259–263|url=http://koeppen-geiger.vu-wien.ac.at/pics/kottek_et_al_2006.gif|doi=10.1127/0941-2948/2006/0130|accessdate=April 22, 2009|year=2006
+
--[[--------------------------< T E S T _ P A R A M E T E R _ I G N O R E D _ 3 >------------------------------
]==] }, {
+
]]
  
[==[ last = Boddington | first = Ann | title = Sejanus. Whose Conspiracy? | journal = The American Journal of Philology | volume = 84 | issue = 1 | pages = 1–16 | date = January 1963 | doi = 10.2307/293155 | jstor = 293155
+
function p:test_parameter_ignored_3()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite newsgroup/new |title=Title |', '}}', '{{cite newsgroup |title=Title |', '}}',
 +
{
 +
{'newsgroup=sommat.sommat.sommat |publisher=Publisher'}, -- citation0() - |publisher= not supported by {{cite newsgroup}}
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author=Zubcevic J, Waki H, Raizada MK, Paton JF |title=Autonomic-immune-vascular interaction: an emerging concept for neurogenic hypertension |journal=Hypertension |volume=57 |issue=6 |pages=1026–33 |year=2011 |month=June |pmid=21536990 |pmc=3105900 |doi=10.1161/HYPERTENSIONAHA.111.169748 |url=http://hyper.ahajournals.org/content/57/6/1026.long
 
]==] }, {
 
  
[==[ author = Whelton PK | year = 2002 |title = Primary prevention of hypertension:Clinical and public health advisory from The National High Blood Pressure Education Program | url = | journal = JAMA | volume = 288 | issue = 15| pages = 1882–8 |doi = 10.1001/jama.288.15.1882 | pmid = 12377087 | author-separator =, | author2 = He J | author3 = Appel LJ | author4 = Cutler JA | author5 = Havas S | author6 = Kotchen TA | display-authors = 6 | last7 = Roccella | first7 = EJ | last8 = Stout | first8 = R | last9 = Vallbona | first9 = C
+
--[[--------------------------< T E S T _ P A R A M _ H A S _ E X T _ L I N K >--------------------------------
|notracking=true ]==] }, {
+
]]
  
[==[ author=Alcocer L, Cueto L |title=Hypertension, a health economics perspective |journal=Therapeutic Advances in Cardiovascular Disease |volume=2 |issue=3 |pages=147–55 |year=2008 |month=June |pmid=19124418 |doi=10.1177/1753944708090572 |url=http://tak.sagepub.com/cgi/pmidlookup?view=long&pmid=19124418 |accessdate=2009-06-20
+
function p:test_param_has_ext_link()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |', '}}', '{{cite book |', '}}',
 +
{
 +
{'title=Title //example.com'}, -- check_for_url()
 +
{'title=Title http://example.com'}, -- check_for_url()
 +
{'title=[http://example.com Title]'}, -- check_for_url()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ title = Are EU Trade Sanctions On Burma Compatible With WTO Law? | journal=Are EU Trade Sanctions on Burma Compatible with WTO Law? | first = Robert | last = Howse | coauthors = Jared M. Genser | pages = 166+| id = | url = http://students.law.umich.edu/mjil/article-pdfs/v29n2-howse-genser.pdf | accessdate =7 November 2010 | quote = repressive and abusive military regime
 
]==] }, {
 
  
[==[ journal = [[Science (journal)|Science]] | last1 = Wodinsky | first1 = Jerome | title = Hormonal Inhibition of Feeding and Death in Octopus: Control by Optic Gland Secretion | date = 2 December 1977 | volume = 198 | issue = 4320| pages = 948–951 | url = http://www.sciencemag.org/content/198/4320/948.abstract | accessdate= 27 November 2011 | doi = 10.1126/science.198.4320.948
+
--[[--------------------------< T E S T _ P A R A M _ A C C E S S _ R E Q U I R E S _ P A R A M >--------------
]==] }, {
+
]]
  
[==[ author=Karakurt F |title=Comparison of the clinical efficacy of flutamide and spironolactone plus ethinyloestradiol/cyproterone acetate in the treatment of hirsutism: a randomised controlled study |journal=Adv Ther |volume=25 |issue=4 |pages=321–8 |year=2008 |month=April |isbn=1232500800395
+
function p:test_param_access_requires_param()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'url-access=subscription'}, -- citation0()
 +
{'doi-access=free'}, -- extract_id_access_levels() (~/Identifiers)
 +
{'chapter-url-access=subscription'}, -- citation0()
 +
-- {'map-url-access=subscription'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ title = Mr. Mackintosh's New God | first = George Jacob | last = Holyoake | authorlink = George Holyoake | magazine = [[w:The Oracle of Reason|The Oracle of Reason, Or, Philosophy Vindicated]] | volume = 1 | issue = 23 | year = 1842 | page = 186 | url = http://books.google.com/books?id=BFY9AAAAYAAJ&pg=PA186 | quote = On the contrary, I, as an Atheist, simply profess that I do not see sufficient reason to ''believe'' that there is a god. I do not pretend to ''know'' that there is no god. The whole question of god's existence, ''belief'' or ''disbelief'', a question of probability or of improbability, not knowledge.
 
]==] }, {
 
  
[==[ last1 = Arenillas | first1 = Miguel | last2 = Castillo | first2 = Juan C. | title = Dams from the Roman Era in Spain. Analysis of Design Forms (with Appendix) | journal = 1st International Congress on Construction History [20th–24th January] | publication-place = Madrid | year = 2003 | url = http://www.traianvs.net/textos/presas_in.htm#_ednref4 | ref = harv
+
--[[--------------------------< T E S T _ P A R A M _ A C C E S S _ R E Q U I R E S _ P A R A M _ 2 >----------
]==] }, {
+
]]
  
[==[ author=International Union of Crystallography |year=1992 |title=Report of the Executive Committee for 1991 |journal=Acta Cryst. |volume=A48 |issue= 6|pages=922 |doi=10.1107/S0108767392008328
+
function p:test_param_access_requires_param_2()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite map/new |title=Title |', '}}', '{{cite map |title=Title |', '}}',
 +
{
 +
{'map-url-access=subscription'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ url = http://www.minsocam.org/ammin/AM66/AM66_885.pdf|journal = American Mineralogist|volume = 66|page=885|year= 1981|title= The largest crystals|author = Rickwood, P. C.
 
]==] }, {
 
  
[==[ last=Watling|first=H. R.|title=The bioleaching of sulphide minerals with emphasis on copper sulphides — A review | journal=Hydrometallurgy | year=2006 | volume=84 | issue=1, 2 | pages=81–108 | url=http://infolib.hua.edu.vn/Fulltext/ChuyenDe/ChuyenDe07/CDe53/59.pdf | format=PDF | doi=10.1016/j.hydromet.2006.05.001
+
--[[--------------------------< T E S T _ M I S S I N G _ P I P E >--------------------------------------------
]==] }, {
+
]]
  
[==[ last1=Richmond|first1=S. J.|coauthors=Brown SR, Campion PD, Porter AJ, Moffett JA, Jackson DA, Featherstone VA, Taylor AJ.|title=Therapeutic effects of magnetic and copper bracelets in osteoarthritis: a randomised placebo-controlled crossover trial|journal=Complement Ther Med.|year=2009|volume=17|issue=5-6|pages=249–256|pmid=19942103|doi=10.1016/j.ctim.2009.07.002
+
function p:test_missing_pipe()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |url=//example.com |', '}}', '{{cite book |title=Title |url=//example.com |', '}}',
 +
{
 +
{'chapter=Chapter access-date=2020-06-10'}, -- missing_pipe_check()
 +
{'chapter=access-date=2020-06-10'}, -- missing_pipe_check()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author=Kivelson G. M., Russell, C. T. |title=Introduction to Space Physics |publisher=Cambridge University Press |year=1995|isbn=0-521-45714-9
 
]==] }, {
 
  
[==[ last=Quigg| first=Catherine T.| title=Tritium Warning| journal=Bulletin of the Atomic Scientists| volume=40|issue=3| pages=56–57|month=March|year=1984
+
--[[--------------------------< T E S T _ M I S S I N G _ P E R I O D I C A L >--------------------------------
]==] }, {
+
]]
  
[==[ last1 = Ralston | first1 = NVC | last2 = Raymond | first2 = LJ | year = 2010 | title = Dietary selenium's protective effects against methylmercury toxicity | url = | journal = Toxicology | volume = 278 | issue = | pages = 112–123
+
function p:test_missing_periodical()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title', '}}', '{{cite journal |title=Title', '}}',
 +
{
 +
{''}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author=Aller TA, Wildsoet C |title=Bifocal soft contact lenses as a possible myopia control treatment: a case report involving identical twins |journal=Clin Exp Optom |volume=91 |issue=4 |pages=394–9 |year=2008 |month=July |pmid=18601670 |doi=10.1111/j.1444-0938.2007.00230.x |url=
 
]==] }, {
 
  
[==[ pmid=17742735|year=1969|last1=Gorman|first1=CF|title=Hoabinhian: A pebble-tool complex with early plant associations in southeast Asia|volume=163|issue=3868|pages=671–3|doi=10.1126/science.163.3868.671|journal=Science
+
--[[--------------------------< T E S T _ M I S S I N G _ P E R I O D I C A L _ 2 >----------------------------
]==] }, {
+
]]
  
[==[ last1 = Tormmsdof | first1 = V. | year = 1966 | title = Progressive metamorphose kieseliger karbonatgesteine in den Zentralalpen zwischen Bernina und Simplon | url = | journal = Schweizerische Mineralogische und Petrographische Mitteilungen = Bulletin Suisse de Mineralogie et Petrographie | volume = 46 | issue = | pages = 431–460
+
function p:test_missing_periodical_2()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite magazine/new |title=Title', '}}', '{{cite magazine |title=Title', '}}',
 +
{
 +
{''}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author=Kivelson G. M., Russell, C. T. |title=Introduction to Space Physics |publisher=Cambridge University Press |year=1995|isbn=0-521-45714-9
 
]==] }, {
 
  
[==[ author=Ellenberger, C. Leroy|date=Winter 1984 |authorlink=C. Leroy Ellenberger |title=Worlds in Collision in Macmillan's Catalogues |journal=Kronos | volume=9 | issue=2 | url=http://www.catastrophism.com/cdrom/pubs/journals/kronos/vol0902/index.htm |accessdate=2009-05-16
+
--[[--------------------------< T E S T _ M I S S I N G _ N A M E >--------------------------------------------
]==] }, {
+
]]
  
[==[ author = Zapolski TC, Cyders MA, Smith GT | title = Positive urgency predicts illegal drug use and risky sexual behavior | journal = Psychol Addict Behav | volume = 23 | issue = 2 | pages = 348–54 | year = 2009 | month = June | pmid = 19586152 | pmc = 2709762 | doi = 10.1037/a0014684
+
function p:test_missing_name()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'author=Black AB |author3=Red EF'}, -- extract_names()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ first=J. | last=Blackwell | coauthors=M.R. Nagarajan and T.B. Hoitink | title=The Structure of the Hard Segments in MDI/diol/PTMA Polyurethane Elastomers | publisher=American Chemical Society | location=Washington, D.C. | year=1981 | issn=0097-6156/81/0172-0179
 
]==] }, {
 
  
[==[ author=Ehret GB |title=Genetic variants in novel pathways influence blood pressure and cardiovascular disease risk |journal=Nature |volume=478 |issue=7367 |pages=103–9 |year=2011 |month=October|pmid=21909115 |doi=10.1038/nature10405 |author-separator=, |author2=Munroe PB |author3=Rice KM|display-authors=3 |last4=Bochud |first4=Murielle |last5=Johnson |first5=Andrew D. |last6=Chasman|first6=Daniel I. |last7=Smith |first7=Albert V. |last8=Tobin |first8=Martin D. |last9=Verwoert|first9=Germaine C. |pmc=3340926
 
]==] }, {
 
  
[==[ author=Lewington S, Clarke R, Qizilbash N, Peto R, Collins R |title=Age-specific relevance of usual blood pressure to vascular mortality: a meta-analysis of individual data for one million adults in 61 prospective studies |journal=Lancet |volume=360 |issue=9349 |pages=1903–13 |year=2002 |month=December |pmid=12493255 |doi= 10.1016/S0140-6736(02)11911-8|url=
+
--[[--------------------------< T E S T _ I N V I S I B L E _ C H A R >----------------------------------------
]==] }, {
+
]]
  
[==[ author = Steiner DF, Oyer PE | title = The biosynthesis of insulin and a probable precursor of insulin by a human islet cell adenoma | journal = Proc. Natl. Acad. Sci. U.S.A. | volume = 57 | issue = 2 | pages = 473–480 | year = 1967 | month = February | pmid = 16591494 | pmc = 335530 | doi = 10.1073/pnas.57.2.473| url =
+
function p:test_invisible_char()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |', '}}', '{{cite book |', '}}',
 +
{
 +
{'title=Title\239\191\189'}, -- replacement char - has_invisible_chars()
 +
{'title=Title\127UNIQ--spoof-000000-QINU\127'}, -- spoof a stripmarker so that comparison compares the same thing; <spoof></spoof> does not exist so not replaced with content
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author = Menting JG, Whittaker J, Margetts MB, Whittaker LJ, Kong GK-W, Smith BJ, Watson CJ, Žáková L, Kletvíková E, JJ, Chan SJ, Steiner DF, Dodson GG, Brzozowski AM, Weiss MA, Ward CW, Lawrence MC | title = How insulin engages its primary binding site on the insulin receptor | journal = Nature | year = 2013 | volume = 493 | issue = 7431 | pages = 241–245 | doi = 10.1038/nature11781 | laysummary = http://www.abc.net.au/news/2013-01-10/australian-researchers-crack-insulin-mechanism/4458974 | laysource = Australian Broadcasting Commission
 
]==] }, {
 
  
[==[ author=J Clemens, PG Jones, NH Gilbert|date=|year=1977|month=|title=Effect of seed treatments on germination in Acacia|journal=Australian Journal of Botany |volume=25 |issue=3 |pages=269–267 |pmid=|doi=10.1071/BT9770269|url=http://www.publish.csiro.au/nid/65/paper/BT9770269.htm
+
--[[--------------------------< T E S T _ I N V A L I D _ P A R A M _ V A L >----------------------------------
]==] }, {
+
]]
  
[==[ title=Martinez Beavers |author=Aleta George |url=http://baynature.org/articles/jan-mar-2008/ear-to-the-ground/martinez-beavers |year=2008 |magazine=Bay Nature |publisher=Bay Nature Institute |accessdate=November 6, 2009
+
function p:test_invalid_param_val()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'mode=cs3'}, -- is_valid_parameter_value()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author = Weissman KJ, Müller R |title = Protein-protein interactions in multienzyme megasynthetases |journal = Chembiochem |volume = 9 |issue = 6 |pages = 826–48 |year = 2008 |pmid = 18357594 |doi = 10.1002/cbic.200700751 |ref = harv
 
]==] }, {
 
  
[==[ last1 = Coyne | first1 = Jerry A. | coauthors = Barton, Turelli | title = Perspective: A Critique of Sewall Wright's Shifting Balance Theory of Evolution | journal = Evolution | year = 1997 | volume = 51 | issue = 3 | series = 3 | pages = 643–671 | doi = 10.2307/2411143
+
--[[--------------------------< T E S T _ F O R M A T _ M I S S I N G _ U R L >--------------------------------
]==] }, {
+
]]
  
[==[ doi = 10.1086/377226 |title = First-Year Wilkinson Microwave Anisotropy Probe (WMAP) Observations: Determination of Cosmological Parameters |first = D. N. |last = Spergel |journal = The Astrophysical Journal Supplement Series |volume = 148 |year = 2003 |issue = 1 |pages = 175–94 |last2 = Verde |first2 = L. |last3 = Peiris |first3 = H. V. |last4 = Komatsu |first4 = E. |last5 = Nolta |first5 = M. R. |last6 = Bennett |first6 = C. L. |last7 = Halpern |first7 = M. |last8 = Hinshaw |first8 = G. |last9 = Jarosik |first9 = N. |ref = harv |bibcode = 2003ApJS..148..175S |arxiv = astro-ph/0302209
+
function p:test_format_missing_url()
| notracking = true
+
    self:preprocess_equals_preprocess_many(
]==] }
+
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
}, {nowiki=false})
+
{
 +
{'format=abc'}, -- style_format()
 +
{'archive-format=def'},
 +
{'chapter-format=ghi'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 
end
 
end
  
function p:test_book()
 
    self:preprocess_equals_preprocess_many('{{cite book/new|', '}}', '{{cite book|', '}}', {
 
      {
 
[==[
 
last                  = LAST
 
| first                = FIRST
 
| authorlink            = AUTHORLINK
 
| last2              = LAST2
 
| first2              = FIRST2
 
| authorlink2        = AUTHORLINK2
 
| editor-last          = EDITOR-LAST
 
| editor-first          = EDITOR-FIRST
 
| editor-link          = EDITOR-LINK
 
| editor2-last        = EDITOR2-LAST
 
| editor2-first      = EDITOR2-FIRST
 
| editor2-link        = EDITOR2-LINK
 
| others                = OTHERS
 
| title                = TITLE
 
| trans_title          = TRANS_TITLE
 
| url                  = URL
 
| archiveurl            = ARCHIVEURL
 
| archivedate          = ARCHIVEDATE
 
| format                = FORMAT
 
| accessdate            = ACCESSDATE
 
| type                  = TYPE
 
| edition              = EDITION
 
| series                = SERIES
 
| volume                = VOLUME
 
| date                  = DATE
 
| origyear              = ORIGYEAR
 
| year                  = YEAR
 
| month                = MONTH
 
| publisher            = PUBLISHER
 
| location              = LOCATION
 
| language              = LANGUAGE
 
| isbn                  = ISBN
 
| oclc                  = OCLC
 
| lccn                  = LCCN
 
| doi                  = 10.DOI
 
| bibcode              = BIBCODE
 
| id                    = ID
 
| page                  = PAGE
 
| pages                = PAGES
 
| nopp                  = NOPP
 
| at                    = AT
 
| chapter              = CHAPTER
 
| trans_chapter        = TRANS_CHAPTER
 
| chapterurl            = CHAPTER_URL
 
| quote                = QUOTE
 
| ref                  = REF
 
| laysummary            = LAYSUMMARY
 
| laydate              = LAYDATE
 
| author-mask          = AUTHOR-MASK
 
| author-name-separator =,
 
| author-separator      = ;
 
| display-authors      = 10
 
| separator            = .
 
| postscript            = POSTSCRIPT
 
| lastauthoramp        =
 
| notracking = true
 
]==] }, {
 
  
[==[ last=Rabinovich|first=Viktor Abramovich |coauthors=Vasserman, A. A.; Nedostup, V. I.; Veksler, L. S.|title=Thermophysical properties of neon, argon, krypton, and xenon|year=1988|edition=English-language |publisher=Hemisphere Publishing Corp. |location=Washington, DC|isbn=0-89116-675-0 |url=http://adsabs.harvard.edu/abs/1988wdch...10.....R |accessdate=2009-04-02
+
--[[--------------------------< T E S T _ F I R S T _ M I S S I N G _ L A S T >--------------------------------
]==] }, {
+
]]
  
[==[ author=Anonymous|editor=Daniel Coit Gilman, Harry Thurston Peck, Frank Moore Colby |year=1904|title=The New International Encyclopædia |publisher=Dodd, Mead and Company|page=906
+
function p:test_first_missing_last()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'first=AB'}, -- extract_names()
 +
{'editor-first=AB'},
 +
{'given=AB'},
 +
{'editor-given=AB'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ pages=1328–1334|title=Linus Pauling: Selected Scientific Papers|volume=2|editor=Pauling, Linus; Kamb, Barclay |place=River Edge, New Jersey|publisher=World Scientific |year=2001|isbn=981-02-2940-2|url=http://books.google.com/?id=2QduA19d_X8C&pg=PA1329
 
]==] }, {
 
  
[==[ title=Soedirman: Bapak Tentara Indonesia |trans_title=Soedirman: Father of the Indonesian Military |language=Indonesian |last=Adi |first=A. Kresna |publisher=Mata Padi Pressindo |isbn=978-602-95337-1-2 |location=Yogyakarta |ref=harv |year=2011
+
--[[--------------------------< T E S T _ E T A L >------------------------------------------------------------
]==] }, {
+
]]
  
[==[ url=http://books.google.ca/books?id=WrkzPcxBnLMC |title=Takhta untuk Rakyat: Celah-celah Kehidupan Sultan Hamengku Buwono IX |trans_title=Serving the People: The Life Story of Sultan Hamengku Buwono IX |language=Indonesian |isbn=978-979-22-6767-9 |editor1-first=Mohamad |editor1-last=Roem |editor1-link=Mohamad Roem |editor2-first=Mochtar |editor2-last=Lubis |editor2-link=Mochtar Lubis |editor3-first=Kustiniyati |editor3-last=Mochtar |editor4-first=Maimoen |editor4-last=S. |last=Nasution |first=A. H. |authorlink=Abdul Haris Nasution |publisher=Gramedia Pustaka Utama |location=Jakarta |year=2011 |origyear=1982 |edition=Revised |ref=harv
+
function p:test_etal()
|notracking=true ]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'editor=Black AB; et al'}, -- name_has_etal()
 +
{'editor=Black AB, et al'},
 +
{'editor=Black AB et al'},
 +
{'editor=Black AB "et al"'},
 +
{'editor=Black AB \'et al\''},
 +
{'editor=Black AB et. al.'},
 +
{'editor=Black AB ET AL'},
 +
{'editor=Black AB EtAl'},
 +
{'editor=Black AB, \'\'et alia.\'\''},
 +
{'editor=Black AB; and others'},
 +
{'editor=Black AB; [[et al]]'},
 +
{'editor=Black AB; [et al]'},
 +
{'editor=Black AB; (et al)'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author=Luhmann J. G., Russell C. T. |editor=J. H. Shirley and R. W. Fainbridge |title=Venus: Magnetic Field and Magnetosphere |work=Encyclopedia of Planetary Sciences |publisher=Chapman and Hall, New York|year=1997 |url=http://www-spc.igpp.ucla.edu/personnel/russell/papers/venus_mag/ |accessdate=2009-06-28|isbn=978-1-4020-4520-2
 
]==] }, {
 
  
[==[ author=Feldman, M. S.; Ferrara, L. A.; Havenstein, P. L.; Volonte, J. E.; Whipple, P. H. |title=Manned Venus Flyby, February 1, 1967 |publisher=Bellcomm, Inc |url=http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19790072165_1979072165.pdf |format=PDF|year=1967
+
--[[--------------------------< T E S T _ E M P T Y _ C I T A T I O N >----------------------------------------
]==] }, {
+
]]
  
[==[ last=Rose |first=Herbert Jennings |authorlink=H.J. Rose |title=A Handbook of Greek Mythology |edition=1st |year=1959 |publisher=E.P. Dutton & Co. |location=New York |language= |isbn=0-525-47041-7 |pages=173
+
function p:test_empty_citation()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new', '}}', '{{cite book', '}}',
 +
{
 +
{''}, -- citation()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ url=http://www.ethnologue.com/show_country.asp?name=AR|title=Languages of Argentina|work=Ethnologue: Languages of the World|edition=16th|editor=Lewis, M. Paul|publisher=SIL International|place=Dallas|year=2009
 
]==] }, {
 
  
[==[ editor=Jean Chrétien Ferdinand Hoefer |contribution=Labarraque, Antoine-Germain |title=Nouvelle biographie universelle |volume=28 |pages=323–324 |ol=24229911M
+
--[[--------------------------< T E S T _ D O I B R O K E N _ M I S S I N G _ D O I >--------------------------
]==] }, {
+
]]
  
[==[ last=Crepeau |first=Bob |title=Niels Bohr: The Atomic Model |journal=Great Scientific Minds |publisher=Great Neck Publishing |date=2006-01-01 |isbn=1-4298-0723-7
+
function p:test_doibroken_missing_doi()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'doi-broken=June 2020'}, -- citation()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ last=Holderness |first=Mary |title=Journey from Riga to the Crimea, with some account of the manners and customs of the colonists of new Russia. |year=1823 |publisher=Sherwood, Jones and co. |location=London |oclc=5073195 |page=316 |lccn=04024846
 
]==] }, {
 
  
[==[ author=Herbst, T. M.; Rix, H.-W.|year=1999 |editor=Guenther, Eike; Stecklum, Bringfried; Klose, Sylvio|title=Star Formation and Extrasolar Planet Studies with Near-Infrared Interferometry on the LBT |booktitle=Optical and Infrared Spectroscopy of Circumstellar Matter, ASP Conference Series, Vol. 188. |isbn=1-58381-014-5|pages=341–350 |bibcode=1999ASPC..188..341H |publisher=Astronomical Society of the Pacific |location=San Francisco, Calif.
+
--[[--------------------------< T E S T _ D E P R E C A T E D _ P A R A M S >----------------------------------
]==] }, {
 
  
[==[ author = Marius Turda| title = The idea of national superiority in Central Europe, 1880-1918| year = 2004| publisher = Edwin Mellen Press| isbn = 978-0-7734-6180-2 ]==] }, {
+
this here for completeness; can't test deprecated param error messaging without actual deprecated parameters; at
 +
this writing, 2020-06-10 there are no deprecated parameters
  
[==[ author=Bhagavan NV|title=Medical Biochemistry |publisher=Harcourt/Academic Press |location=San Diego |year=2002 |isbn=0-12-095440-0|url=http://books.google.com/?id=vT9YttFTPi0C&printsec=frontcover]==] }, {
+
]]
  
[==[ author=Edgar Thorpe|title=The Pearson CSAT Manual 2012|url=http://books.google.com/books?id=1cruroSVFoUC&pg=RA3-PA38|accessdate=18 November 2012|year=2012|publisher=Pearson Education India|isbn=978-81-317-6734-4|page=3]==] }, {
+
function p:test_deprecated_params()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'editors'}, -- citation()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author=Iyengar PTS |year=2001 |title=History Of The Tamils: From the Earliest Times to 600 A.D. |publisher=Asian Educational Services |isbn=81-206-0145-9 |url=http://books.google.com/books?id=ERq-OCn2cloC |pages=192–195 |accessdate=29 December 2008 ]==] }, {
 
  
[==[ author=Motilal (UK) Books of India|title=Tourist Guide Kerala|url=http://books.google.com/books?id=ZYfRBcLdTNYC&pg=PA11|accessdate=18 November 2012|date=1 February 2008|publisher=Sura Books|isbn=978-81-7478-164-2|page=11]==] }, {
+
--[[--------------------------< T E S T _ C O N T R I B U T O R _ M I S S I N G _ R E Q U I R E D _ P A R A M >
 +
]]
  
[==[ author=S. N. Sadasivan|title=River Disputes in India: Kerala Rivers Under Siege|url=http://books.google.com/books?id=hhrRboi5kOcC&pg=PA223|accessdate=18 November 2012|year=2003|publisher=Mittal Publications|isbn=978-81-7099-913-3|page=223]==] }, {
+
function p:test_contributor_missing_required_param()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |contributor=Contributor |', '}}', '{{cite book |title=Title |contributor=Contributor |', '}}',
 +
{
 +
{'contribution=Contribution'}, -- citation0()
 +
{'author=Author'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author1=Joseph Needham|author2=Gwei-Djen Lu|author3=Ling Wang|title=Science and civilisation in China, Volume 5, Part 7|year=1987|publisher=Cambridge University Press|isbn=978-0-521-30358-3|pages=48–50]==] }, {
 
  
[==[ editor=Mark W. Denny & Steven Dean Gaines |year=2007 |title=Encyclopedia of tidepools and rocky shores |publisher=[[University of California Press]] |isbn=978-0-520-25118-2 |author=Carlos Robles |chapter=Lobsters |pages=333–335 |url=http://books.google.co.uk/books?id=uufQnE7MzMkC&pg=PA333]==] }, {
+
--[[--------------------------< T E S T _ C O N T R I B U T O R _ I G N O R E D >------------------------------
 +
]]
  
[==[ first=Elena|last=Aprile|coauthors=Bolotnikov, Aleksey E.; Doke, Tadayoshi |title=Noble Gas Detectors|publisher=Wiley-VCH|year=2006 |isbn=3-527-60963-6|url=http://books.google.com/?id=tsnHM8x6cHAC&pg=PT1|pages=8–9]==] }, {
+
function p:test_contributor_ignored()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |contributor=Contributor |journal= Journal', '}}', '{{cite journal |title=Title |contributor=Contributor |journal= Journal', '}}',
 +
{
 +
{''}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ first=Sidney F. |last=Ray |title=Applied Photographic Optics: Lenses and Optical Systems for Photography, Film, Video, Electronic and Digital Imaging |location= |publisher=Focal Press |year=2002 |isbn=0-240-51540-4 |page=40 |url=http://www.google.com/books?id=cuzYl4hx-B8C&printsec=frontcover#PPA40,M1 ]==] }, {
 
  
[==[ last = Koch | first = John | title = Tartessian: Celtic from the Southwest at the Dawn of History in Acta Palaeohispanica X Palaeohispanica 9 (2009)| publisher=Palaeohispanica | year = 2009 | pages = 339–351 | url = http://ifc.dpz.es/recursos/publicaciones/29/54/26koch.pdf | id = | issn = 1578-5386 | accessdate =17 May 2010 ]==] }, {
+
--[[--------------------------< T E S T _ C L A S S _ I G N O R E D >------------------------------------------
 +
]]
  
[==[ last = Rhodes |first = Richard |year = 1986 |title = The Making of the Atomic Bomb |isbn = 0-671-65719-4 |pages = 659–660 |publisher = Simon & Schuster |location = New York]==] }, {
+
function p:test_class_ignored()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite arxiv/new |title=Title |author=Author |', '}}', '{{cite arxiv |title=Title |author=Author |', '}}',
 +
{
 +
{'arxiv=abc.de/9901333 |class=abc'}, -- arxiv() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ last = Watt | first = William Montgomery |authorlink = William Montgomery Watt| title = [[Muhammad at Mecca (book)|Muhammad at Mecca]]| publisher=Oxford University Press | year = 1953 | id = | ref = harv]==] }, {
 
  
[==[ last=Cooper |first=J.C. |title=Symbolic and Mythological Animals |pages=25–26 |year=1992 |publisher=Aquarian Press |location=London |isbn=1-85538-118-4]==] }, {
+
--[[--------------------------< T E S T _ C I T E S E E R X _ M I S S I N G >----------------------------------
 +
]]
  
[==[ last=Finnegan |first=Dana G. |coauthor = Emily B. McNally |title=Counseling Lesbian, Gay, Bisexual, and Transgender Substance Abusers: Dual Identities |publisher=Haworth Press |date=2002|isbn= 1-56023-925-5 |url =http://books.google.com/books?id=I32nHF_gaTsC ]==] }, {
+
function p:test_citeseerx_missing()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite citeseerx/new |', '}}', '{{cite citeseerx |', '}}',
 +
{
 +
{'title=Title '}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ title=[[Ellipsis|Dots...]] |author=Doe, Dotty D. | publisher=[[McGraw-Hill|Dot Corp.]] |series=Dot Books Etc. |pages=23 ''[[ff.]]'' |id=Std. ]==] }, {
 
  
[==[ last=Hume |first=David |authorlink=David Hume |title=[[s:An Enquiry Concerning Human Understanding|An Enquiry Concerning Human Understanding]] |year=1748 |location=London |ref=harv]==] }, {
+
--[[--------------------------< T E S T _ C I T E _ W E B _ U R L >--------------------------------------------
 +
]]
  
[==[ last=Köse|first=Yavuz|editor-last=Atabaki|editor-first=Touraj|editor2-last=Brockett|editor2-first=Gavin|chapter=Vertical Bazaars of Modernity: Western Department Stores and Their Staff in Istanbul (1889–1921)|title=Ottoman and Republican Turkish Labour History|publisher=Cambridge University Press|location=Cambridge, Eng.|year=2009|isbn=978-0-521-12805-6|pages=91–114|ref=harv]==] }, {
+
function p:test_cite_web_url()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite web/new |', '}}', '{{cite web |', '}}',
 +
{
 +
{'title=Title'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ last=Roebuck|first=Carl|title=Ionian Trade and Colonization|year=1959|series=Monographs on Archaeology and Fine Arts|publisher=Archaeological Institute of America|location=New York|isbn=978-0-89005-528-1|ref=harv]==] }, {
 
  
[==[ last=Wiberg|first= Egon|coauthor= Wiberg, Nils and Holleman, Arnold Frederick |title=Inorganic Chemistry |publisher=Academic Press|year=2001|isbn=0-12-352651-5|ref=harv]==] }, {
+
--[[--------------------------< T E S T _ C I T E _ W E B _ U R L _ 2 >----------------------------------------
 +
]]
  
[==[ last1=Masters|first1=Bruce Alan|last2=Ágoston|first2=Gábor|year=2009|title=Encyclopedia of the Ottoman Empire|publisher=Infobase Publishing|location=New York|isbn=978-1-4381-1025-7|ref=harv]==] }, {
+
function p:test_cite_web_url_2()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{citation/new |', '}}', '{{citation |', '}}',
 +
{
 +
{'title=Title |website=Website'}, -- citation0()
 +
{'title=Title |script-website=ja:Website'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ ref=harv |url=http://books.google.ca/books?id=LjzZ_rVv_2MC&pg=PA30 |title=Villes et organisation de l'espace en Afrique |pages=30–31 |first1=Jérôme |last1=Aloko-N'Guessan |first2=Amadou |last2=Diallo |first3=Kokou Henri |last3=Motcho |publisher=KARTHALA Editions |year=2010 |ISBN=2-8111-0339-2]==] }, {
 
  
[==[ title = Statics: Analysis and Design of Systems in Equilibrium | last = Sheppard and Tongue | publisher = Wiley and Sons | year = 2005 | page = 618 | quote = In general, for given contacting surfaces, ''μ''<sub>k</sub> < ''μ''<sub>s</sub> | isbn = 0-471-37299-4]==] }, {
+
--[[--------------------------< T E S T _ C I T A T I O N _ M I S S I N G _ T I T L E >------------------------
 +
]]
  
[==[ title=A Concise History of Modern India |first1=Barbara D. |last1=Metcalf |first2=Thomas R. |last2=Metcalf |authorlink1=Barbara D. Metcalf |authorlink2=Thomas R. Metcalf |edition=Second |location=Cambridge |publisher=Cambridge University Press |year=2006 |pages=20–21 |isbn=978-0-521-86362-9]==] }, {
+
function p:test_citation_missing_title()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |', '}}', '{{cite book |', '}}',
 +
{
 +
{'author=Author'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ title=Geochemical processes in soil and groundwater: measurement—modelling—upscaling |first1=Horst D. |last1=Schulz |first2=Astrid |last2=Hadeler |author3=Deutsche Forschungsgemeinschaft |publisher=Wiley-VCH |year=2003 |isbn=3-527-27766-8 |page=67 |url=http://books.google.com/books?id=Fo1PjKW9GpUC]==] }, {
 
  
[==[ title=Normans: The History of a Dynasty|last=Crouch|first=David|year=2006|publisher=Hambledon Continuum|isbn=978-1-85285-595-6Z|ref=harv]==] }, {
+
--[[--------------------------< T E S T _ C I T A T I O N _ M I S S I N G _ T I T L E _ 2 >--------------------
 +
]]
  
[==[ title=Southeastern Ceremonial Complex : Chronology, Content, Context|editor=King, Adam|author1=Kelly, John E.|author2=Brown, James A.|author3=Hamlin, Jenn M.|author4=Kelly, Lucretia S.|author5=Kozuch, Laura|author6=Parker, Kathryn|author7=Van Nest, Julieann|chapter=Mound 34 : The Context for the Early Evidence of the Southeastern Ceremonial Complex at Cahokia|pages=57–87|isbn=978-0-8173-5409-1|publisher=University of Alabama Press]==] }, {
+
function p:test_citation_missing_title_2()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite episode/new |', '}}', '{{cite episode |', '}}',
 +
{
 +
{'author=Author'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ url = http://books.google.ca/books?id=0M4Pl_VCExgC | title = Forgotten Wars: Freedom and Revolution in Southeast Asia | isbn = 978-0-674-02153-2 | last1 = Bayly | first1 = Christopher Alan | last2 = Harper | first2 = Timothy Norman | year = 2007 | ref = harv | location = Cambridge | publisher = Belknap Press ]==] }, {
 
  
[==[ url = http://books.google.de/books?id=iX194mHFAcYC&pg=PA11 | page = 11 | title = The Correspondence of Michael Faraday | isbn = 978-0-86341-251-6 | author1 = Faraday, Michael | author2 = James, Frank A. J. L | year = 1999]==] }, {
+
--[[--------------------------< T E S T _ C H A P T E R _ I G N O R E D >--------------------------------------
 +
]]
  
[==[ url=http://books.google.com/?id=COcVgAtqeKkC&pg=PA473|page=473|title=Handbook of semiconductor silicon technology|first1=William C.|last1=O'Mara|first2=Robert B.|last2 =Herring| first3=Lee Philip|last3=Hunt|publisher=William Andrew|year=1990|isbn=978-0-8155-1237-0]==] }, {
+
function p:test_chapter_ignored()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite news/new |title=Title |', '}}', '{{cite news |title=Title |', '}}',
 +
{
 +
{'chapter=Chapter'}, -- citation0()
 +
{'chapter-url=//example.com'}, -- citation0()
 +
{'trans-chapter=Trans-chapter'}, -- citation0()
 +
{'script-chapter=ja:Script-chapter'}, -- citation0()
 +
{'chapter-format=Chapter-format'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[
 
last=Sedgwick |first=John |title=Popular Filmgoing In 1930s Britain: A Choice of Pleasures |publisher=[[University of Exeter Press]] |year=2000 |isbn=9780859896603 |pages=[http://books.google.com/books?id=YsUfc8Ijb-wC&pg=PA146 146]–148 ]==] }, {
 
  
[==[ chapter=Naturalism and Physicalism | last=Fales | postscript=, | first=Evan ]==] }, {
+
--[[--------------------------< T E S T _ B I O R X I V _ M I S S I N G >--------------------------------------
 +
]]
  
[==[ trans_title=My Book in English | last=Pan | location=Neverland | date=1965 | first=Peter | publisher=Foreign Books
+
function p:test_biorxiv_missing()
|notracking = true ]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite biorxiv/new |', '}}', '{{cite biorxiv |', '}}',
 +
{
 +
{'title=Title '}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ trans_title=My Book in English | last=Pan | location=Neverland | date=1965 | first=Peter | publisher=Foreign Books | url = http://www.foo.com/
 
|notracking = true ]==] }, {
 
  
[==[ first5=FifthFirst | author-separator= % | last1=FirstLast | last3=ThirdLast | last2=SecondLast | first2=SecondFirst | first4=FourthFirst | authormask=with | last4=FourthLast | first1=FirstFirst | title=Title | last5=FifthLast | first3=ThirdFirst ]==] }
+
--[[--------------------------< T E S T _ B A R E _ U R L _ M I S S I N G _ T I T L E >------------------------
 +
]]
  
}, {nowiki=false})
+
function p:test_bare_url_missing_title()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |', '}}', '{{cite book |', '}}',
 +
{
 +
{'title=Title |chapter-url=//example.com'}, -- citation0()
 +
{'title=Title |conference-url=//example.com'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 
end
 
end
  
function p:test_web()
 
    self:preprocess_equals_preprocess_many('{{cite web/new|', '}}', '{{cite web|', '}}', {
 
      {
 
[==[
 
url          = URL
 
|title        = TITLE
 
|last1        = LAST1
 
|first1      = FIRST1
 
|authorlink1  = AUTHORLINK1
 
|last2        = LAST2
 
|first2      = FIRST2
 
|authorlink2  = AUTHORLINK2
 
|date        = DATE
 
|month        = MONTH
 
|year        = YEAR
 
|editor-last  = EDITOR-LAST
 
|editor-first = EDITOR-FIRST
 
|editor      = EDITOR
 
|editor-link  = EDITOR-LINK
 
|editor1-last = EDITOR1-LAST
 
|editor1-first= EDITOR1-FIRST
 
|editor1-link = EDITOR1-LINK
 
|editor2-last = EDITOR2-LAST
 
|editor2-first= EDITOR2-FIRST
 
|editor2-link = EDITOR2-LINK
 
|work        = WORK
 
|series      = SERIES
 
|publisher    = PUBLISHER
 
|location    = LOCATION
 
|page        = PAGE
 
|pages        = PAGES
 
|at          = AT
 
|language    = LANGUAGE
 
|trans_title  = TRANS_TITLE
 
|type        = TYPE
 
|format      = FORMAT
 
|arxiv        = ARXIV
 
|asin        = ASIN
 
|bibcode      = BIBCODE
 
|doi          = 10.DOI
 
|doi_brokendate = 10 June 2015
 
|isbn        = ISBN
 
|issn        = ISSN
 
|jfm          = JFM
 
|jstor        = JSTOR
 
|lccn        = LCCN
 
|mr          = MR
 
|oclc        = OCLC
 
|ol          = OL
 
|osti        = OSTI
 
|pmc          = PMC
 
|pmid        = PMID
 
|rfc          = RFC
 
|ssrn        = SSRN
 
|zbl          = ZBL
 
|id          = ID
 
|archiveurl  = ARCHIVEURL
 
|archivedate  = ARCHIVEDATE
 
|deadurl      = DEADURL
 
|accessdate  = ACCESSDATE
 
|quote        = QUOTE
 
|ref          = REF
 
|separator    = .
 
|postscript  = POSTSCRIPT
 
|notracking = true
 
]==] }, {
 
  
[==[ url= http://www.indec.mecon.ar/nuevaweb/cuadros/2/proyecciones_provinciales_vol31.pdf |title= Proyecciones provinciales de población por sexo y grupos de edad 2001–2015 |work=Gustavo Pérez |format= PDF |publisher=[[INDEC]] |page= 16 |language= español
+
--[[--------------------------< T E S T _ B A R E _ U R L _ M I S S I N G _ T I T L E _ 2 >--------------------
]==] }, {
+
]]
  
[==[ url=http://www.gamesbids.com/eng/index.php?news=1177787226 |title= Delhi To Bid For 2020 Summer Games|accessdate=5 August 2007 |date=28 April 2007 |work= gamesbids.com|publisher= Menscerto Inc.
+
function p:test_bare_url_missing_title_2()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite map/new |', '}}', '{{cite map |', '}}',
 +
{
 +
{'title=Title |map-url=//example.com'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author=Staff|year=2007 |url=http://www.infoplease.com/ce6/sci/A0852881.html |title=Xenon|work=Columbia Electronic Encyclopedia |edition=6th|publisher=Columbia University Press |accessdate=2007-10-23
 
]==] }, {
 
  
[==[ url=http://shook.pragmatism.org/skepticismaboutthesupernatural.pdf | title=Skepticism about the Supernatural | author=Shook, John R. | accessdate=2012-10-02
+
--[[--------------------------< T E S T _ B A D _ Z B L >------------------------------------------------------
]==] }, {
+
]]
  
[==[ title=Bintang Mahaputera Adipurna |language=Indonesian |url=http://www.setneg.go.id/index.php?option=com_tandajasa&Itemid=43&cat=2&id=6 |work=Awards of the Republic of Indonesia |publisher=Indonesian State Secretariat |accessdate=17 May 2012
+
function p:test_bad_zbl()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'zbl=ZBL'}, -- zbl() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ url=http://www.fs.fed.us/r9/publications/success_story_updates/2003-05.pdf |format=PDF|title=Success Stories |accessdate=2008-04-20 |author=US Forest Service |year=2003 |month=May |chapter=Mules Key in Accomplishing Trail Work |publisher=US Department of Agriculture |page=4
 
]==] }, {
 
  
[==[ url=http://www.ommbid.com/ |title= Galactosemia |chapter=72 |author=Fridovich-Keil JL, Walter JH |format= |work=The Online Metabolic and Molecular Bases of Inherited Disease |accessdate=
+
--[[--------------------------< T E S T _ B A D _ U S E N E T _ I D >------------------------------------------
]==] }, {
+
]]
  
[==[ author=Vijverberg et al. | title=Similar mode of action of pyrethroids and DDT on sodium channel gating in myelinated nerves | url=http://www.nature.com/nature/journal/v295/n5850/abs/295601a0.html | journal=Nature | volume=42 | issue=295 | year=1982 | accessdate=2012-04-28
+
function p:test_bad_usenet_id()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite newsgroup/new |title=Title |', '}}', '{{cite newsgroup |title=Title |', '}}',
 +
{
 +
{'message-id=message-id'}, -- usenet_id() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ url= http://www.ign.gob.ar/AreaProfesional/Geografia/DatosArgentina|title= Datos de la República Argentina|language = Spanish|trans_title = Data of the Argentine Republic|author= Rubén Albanese|year= 2009|publisher= Instituto Geográfico Nacional
 
]==] }, {
 
  
[==[ url=http://www.cornellpress.cornell.edu/book/?GCOI=80140100965480|author=Bamber, G.J., Gittell, J.H., Kochan, T.A. & von Nordenflytch, A. |year=2009 |title=Up in the Air: How Airlines Can Improve Performance by Engaging their Employees|publisher=Cornell University Press, Ithaca |chapter=Chapter 5
+
--[[--------------------------< T E S T _ B A D _ U R L >------------------------------------------------------
]==] }, {
+
]]
  
[==[ accessdate=2007-07-21|url=http://www.roman-emperors.org/assobd.htm#t-inx|title=De Imperatoribus Romanis|work=An Online Encyclopedia of Roman Emperors|quote= Battle of Sarmizegetusa (Sarmizegetuza), A.D. 105. During Trajan's reign one of the most important Roman successes was the victory over the Dacians. The first important confrontation between the Romans and [[Dacia|the Dacians]] had taken place in the year 87 and was initiated by Domitian. The [[praetorian prefect]] Cornelius Fuscus led five or six legions across the Danube on a bridge of ships and advanced towards [[Banat]] (in [[Romania]]). The Romans were surprised by a Dacian attack at Tapae (near the village of [[Bucova]], in Romania). [[Legion V Alaude]] was crushed and Cornelius Fuscus was killed. The victorious [[Dacia]]n general was originally known as [[Diurpaneus]] (see Manea, p.109), but after this victory he was called [[Decebalus]] (the brave one). ]==] }, {
+
function p:test_bad_url()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'url=example.com'}, -- zbl() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ author = Fermilab | year = 2006 | title = Jobs at Fermilab: Employer Awards | url = http://lss.fnal.gov/employ/employer_awards.html | accessdate = 2006-01-06 |archiveurl = http://web.archive.org/web/20070110184255/http://lss.fnal.gov/employ/employer_awards.html |archivedate = January 10, 2007]==] }, {
 
  
[==[ author=Posted 8 April 2000 by admin |url=http://www.foodfirst.org/media/opeds/2000/4-greenrev.html |title=Food First/Institute for Food and Development Policy |publisher=Foodfirst.org |date=8 April 2000 |accessdate=25 August 2010]==] }, {
+
--[[--------------------------< T E S T _ B A D _ S S R N >----------------------------------------------------
 +
]]
  
[==[ first=Ray P.|last=Norris|pages=1–4 |title=Searching for the Astronomy of Aboriginal Australians |work=Conference Proceedings | year=2004 |publisher=Australia Telescope National Facility | url=http://www.atnf.csiro.au/research/AboriginalAstronomy/literature/Norris2007b.pdf |format=PDF | accessdate=2009-05-16]==] }, {
+
function p:test_bad_ssrn()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'ssrn=SSRN'}, -- ssrn() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ last = | first = | authorlink = | coauthors = | title =The National Revolution, 1945–50 | work =Country Studies, Indonesia | publisher =U.S. Library of Congress | date = | url =http://countrystudies.us/indonesia/16.htm | doi = | accessdate = ]==] }, {
 
  
[==[ last= Smith |first= Joseph Jr |authorlink= Joseph Smith Jr |title= Pearl Of Great Price |url= http://lds.org/library/display/0,4945,106-1-2-1,FF.html |postscript= <!-- Bot inserted parameter. Either remove it; or change its value to "." for the cite to end in a ".", as necessary. -->]==] }, {
+
--[[--------------------------< T E S T _ B A D _ S B N >------------------------------------------------------
 +
]]
  
[==[ last=Cooler | first=Richard M. | title=The Art and Culture of Burma | year=2002 | url=http://www.seasite.niu.edu/burmese/cooler/BurmaArt_TOC.htm | publisher=Northern Illinois University | location=DeKalb ]==] }, {
+
function p:test_bad_sbn()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'sbn=123–456789'}, -- invalid character - sbn() (~/Identifiers)
 +
{'sbn=12345678'}, -- improper length
 +
{'sbn=123X45678'}, -- X in wrong spot
 +
{'sbn=012345678'}, -- incorrect check digit
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ last=Food|first=BBC|title=Tapenade | url=http://www.bbc.co.uk/food/tapenade | work=BBC Food | publisher=British Broadcasting Corporation | accessdate=4 July 2011]==] }, {
 
  
[==[ last=Nave| first=C. R.|title=Deuterium-Tritium Fusion| work=HyperPhysics| publisher=Georgia State University| year=2006| url=http://hyperphysics.phy-astr.gsu.edu/Hbase/nucene/fusion.html| accessdate=2008-03-08]==] }, {
+
--[[--------------------------< T E S T _ B A D _ S 2 C I D >--------------------------------------------------
 +
]]
  
[==[ last=Stern|first=David P.|date=2005-02-13| url=http://www-spof.gsfc.nasa.gov/stargaze/Q7.htm| title=Wave Mechanics| publisher=NASA Goddard Space Flight Center| accessdate=2008-04-16]==] }, {
+
function p:test_bad_s2cid()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'s2cid=S2CID'}, -- s2cid() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ publisher=[http://www.metalfromfinland.com/ MetalFromFinland.com] | title=Nightwish's 'Amaranth' Single Available As Flower-Fragrance-Shaped Picture Disc | url=http://www.metalfromfinland.com/news/2010-01-29_11:19/nightwishs_amaranth_single_available_as_flowerfragranceshaped_picture_disc | date= 2010-01-29 | accessdate=2010-01-13]==] }, {
 
  
[==[ title = How Wildfires Work|author= Bonsor, Kevin| publisher = [[HowStuffWorks]]| url = http://science.howstuffworks.com/wildfire.htm|accessdate=2007-07-23| archiveurl= http://web.archive.org/web/20070714174036/http://science.howstuffworks.com/wildfire.htm| archivedate= 14 July 2007 <!--DASHBot-->| deadurl= no]==] }, {
+
--[[--------------------------< T E S T _ B A D _ O C L C >----------------------------------------------------
 +
]]
  
[==[ title = The real Chubby Checker, 71, was born with the name Ernest Evans. He trademarked his stage name in 1997|url = http://www.guardian.co.uk/music/2013/feb/14/chubby-checker-sues-hewlett-packard|accessdate = February 14, 2013]==] }, {
+
function p:test_bad_oclc()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'oclc=OCLC'}, -- oclc() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ title=A Long Lipid, a Long Name: Docosahexaenoic Acid|url=http://www.samuelfurse.com/2011/12/a-long-name-a-long-lipid-docosahexaenoic-acid/|work=The Lipid Chronicles|accessdate=2011-12-31]==] }, {
 
  
[==[ title=California Symbols |publisher=California State Capitol Museum |url=http://www.capitolmuseum.ca.gov/VirtualTour.aspx?content1=1278&Content2=1374&Content3=1294 |accessdate=2007-09-14| archiveurl= http://web.archive.org/web/20071012123245/http://capitolmuseum.ca.gov/VirtualTour.aspx?content1=1278&Content2=1374&Content3=1294| archivedate= 12 October 2007 <!--DASHBot-->| deadurl= no]==] }, {
+
--[[--------------------------< T E S T _ B A D _ P M I D >----------------------------------------------------
 +
]]
  
[==[ title=Maternal and Neonatal Tetanus Elimination by 2005 | year=2000 | month = November | publisher = UNICEF | url=http://www.unicef.org/immunization/files/MNTE_strategy_paper.pdf | accessdate=2007-01-26 ]==] }, {
+
function p:test_bad_pmid()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'pmid=PMID'}, -- pmid() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ title=Population Estimates|url=http://www.census.gov/popest/data/cities/totals/2011/files/SUB-EST2011-IP.csv|publisher={{URL|1=http://en.wikipedia.org/wiki/United_States_Census_Bureau|2=United States Census Bureau}} ]==] }, {
 
  
[==[ title=The Structure of a Membrane|url=http://www.samuelfurse.com/2011/11/the-structure-of-a-membrane/|work=The Lipid Chronicles|accessdate=2011-12-31]==] }, {
+
--[[--------------------------< T E S T _ B A D _ P M C >------------------------------------------------------
 +
]]
  
[==[ title=Unit of thermodynamic temperature (kelvin) |work=SI Brochure, 8th edition |pages=Section 2.1.1.5 |url=http://www1.bipm.org/en/si/si_brochure/chapter2/2-1/2-1-1/kelvin.html |publisher=Bureau International des Poids et Mesures |year=1967 |accessdate=2008-02-06]==] }, {
+
function p:test_bad_pmc()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'pmc=PMC'}, -- pmc() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ url = http://pogoda.ru.net/climate/33345.htm | title = Weather and Climate - The Climate of Kiev | publisher = Weather and Climate (Погода и климат) | accessdate = March 1, 2013 | language = Russian]==] }, {
 
  
[==[ url = http://www.lanl.gov/history/people/R_Schreiber.shtml |title = Raemer Schreiber |work = Staff Biographies |publisher = Los Alamos National Laboratory |location = Los Alamos (NM) |author = LANL contributors |accessdate = November 16, 2008 ]==] }, {
+
--[[--------------------------< T E S T _ B A D _ P A R A M _ L I N K >----------------------------------------
 +
]]
  
[==[ url= http://berkleycenter.georgetown.edu/resources/countries/argentina |title=Argentina |publisher=[[Berkley Center for Religion, Peace, and World Affairs]]]==] }, {
+
function p:test_bad_paramlink()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |', '}}', '{{cite book |', '}}',
 +
{
 +
{'title=[[Title]] |title-link=Title'}, -- link_title_ok()
 +
{'title=Title |title-link=[[Title]]'}, -- link_title_ok()
 +
{'title=Title |title-link=//example.com'}, -- link_title_ok()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ url=http://213.253.134.43/oecd/pdfs/browseit/0406041E.PDF|format=PDF|title=Competitive Cities in the Global Economy|author=OECD|accessdate=30 April 2009|authorlink=Organisation for Economic Co-operation and Development]==] }, {
 
  
[==[ url=http://factfinder2.census.gov/bkmk/table/1.0/en/ACS/11_1YR/DP03/1600000US1714000| title=Selected Economic Characteristics: 2011 American Community Survey 1-Year Estimates (DP03): Chicago city, Illinois| publisher=U.S. Census Bureau, American Factfinder| accessdate=February 8, 2013]==] }, {
+
--[[--------------------------< T E S T _ B A D _ O L >--------------------------------------------------------
 +
]]
  
[==[ url=http://liftoff.msfc.nasa.gov/academy/astronauts/training.html | archiveurl=http://web.archive.org/web/20070910124735/http://liftoff.msfc.nasa.gov/academy/astronauts/training.html | archivedate=2007-09-10 | title=Selection and Training of Astronauts|accessdate=October 4, 2007 |publisher=NASA|year=1995|author=NASA]==] }, {
+
function p:test_bad_ol()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'ol=OL'}, -- ol() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ url=http://quod.lib.umich.edu/cgi/t/text/text-idx?c=jii;view=text;rgn=main;idno=4750978.0016.105 |title =Environmental and Structural Inequalities in Greater Accra |accessdate =22 July 2010|publisher =The Journal of the International Institute]==] }, {
 
  
[==[ url=http://users.rcn.com/jkimball.ma.ultranet/BiologyPages/T/Telomeres.html |author=John W. Kimball |date=November 25, 2008 |title=Telomeres]==] }, {
+
--[[--------------------------< T E S T _ B A D _ M R >--------------------------------------------------------
 +
]]
  
[==[ url=http://worldaerodata.com/wad.cgi?id=GH02526&sch=DGAA | title=Kotoka International Airport|publisher=World Aero Data|year=2009|accessdate=29 October 2009]==] }, {
+
function p:test_bad_mr()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'mr=MR'}, -- mr() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ url=http://www.bbc.co.uk/wales/music/sites/big_weekend/ | title=BBC Wales – Big Weekend|accessdate=23 February 2008]==] }, {
 
  
[==[ url=http://www.chem.umn.edu/class/2301/barany03f/fun/beautiful1.pdf |title=Chemistry at its Most Beautiful |accessdate=2007-09-13|last=Freemantel|first=Michael |date=August 25, 2003|format=PDF |publisher=Chemical & Engineering News]==] }, {
+
--[[--------------------------< T E S T _ B A D _ L C C N >----------------------------------------------------
 +
]]
  
[==[ url=http://www.dublincity.ie/RecreationandCulture/DublinCityParks/Pages/Facts%20About%20Our%20Parks.aspx |title=Dublin City Council – ''Facts About Our Parks'' |publisher=Dublincity.ie |date= |accessdate=14 January 2012]==] }, {
+
function p:test_bad_lccn()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'lccn=LCCN'}, -- lccn() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ url=http://www.fws.gov/news/NewsReleases/showNews.cfm?newsId=9191BAAD-F8E8-0097-B3670BDF3849EBF2|title=Fish and Wildlife Service Awards $800,000 in Grants to Explore Cause, Control of White-Nose Syndrome in Bats|date=2009-10-26|publisher=[[United States Fish and Wildlife Service]]|accessdate=2009-10-30]==] }, {
 
  
[==[ url=http://www.guinnessworldrecords.com/content_pages/record.asp?recordid=51451 |publisher=[[Guinness World Records]] |title=Heaviest marine crustacean |accessdate=August 3, 2006 |archiveurl=http://web.archive.org/web/20060528192250/ |archivedate=May 28, 2006]==] }, {
+
--[[--------------------------< T E S T _ B A D _ J F M >------------------------------------------------------
 +
]]
  
[==[ url=http://www.hurriyetdailynews.com/default.aspx?pageid=438&n=new-card-alternative-to-akbil-raises-questions-2010-07-16|last=Songün|first=Sevim|work=Hürriyet Daily News|title=Istanbul Commuters Skeptical of Transit Change|date=16 July 2010|accessdate=5 July 2012]==] }, {
+
function p:test_bad_jfm()
 
+
    self:preprocess_equals_preprocess_many(
[==[ url=http://www.lboro.ac.uk/gawc/world2008t.html |title=The World According to GaWC 2008 |work=Globalization and World Cities Research Network|publisher=GaWC Loughborough University |accessdate=April 29, 2009]==] }, {
+
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'jfm=JFM'}, -- jfm() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[ url=http://www.medicinenet.com/yaws/page4.htm|title=Yaws|accessdate=5 August 2012|authors=Davis, Charles Patrick; Stoppler, Melissa Conrad|publisher=MedicineNet.com]==] }, {
 
  
[==[ url=http://www.autoblog.com/2010/03/29/hennessey-venom-gt-a-600k-mid-engine-cobra-for-the-21st-centur/ |title=Hennessey Venom GT: A $600k mid-engine Cobra for the 21st Century |accessdate=2010-03-29 |last=Lavrinc |first=Damon |date=2010-03-29 |work=[[Autoblog.com|Autoblog]] |publisher=[[Weblogs, Inc.]] ]==] }
+
--[[--------------------------< T E S T _ B A D _ I S S N >----------------------------------------------------
 +
]]
  
}, {nowiki=false})
+
function p:test_bad_issn()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'issn=ISSN'}, -- issn() (~/Identifiers)
 +
{'eissn=eISSN'}, -- issn() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 
end
 
end
  
function p:test_citation()
 
    self:preprocess_equals_preprocess_many('{{citation/new|', '}}', '{{citation|', '}}', { {
 
[==[
 
author  = AUTHOR
 
| last    = LAST
 
| first  = FIRST
 
| author2 = AUTHOR2
 
| last2  = LAST2
 
| first2  = FIRST2
 
| author-link  = AUTHOR-LINK
 
| author2-link = AUTHOR-LINK2
 
| author-separator = ;
 
| author-name-separator =,
 
| author-mask = AUTHOR-MASK
 
| display-authors = 9
 
| coauthors = COAUTHORS
 
| editor        = EDITOR
 
| editor-last  = EDITOR-LAST
 
| editor-first  = EDITOR-FIRST
 
| editor2      = EDITOR2
 
| editor2-last  = EDITOR2-LAST
 
| editor2-first = EDITOR2-FIRST
 
| editor-link  = EDITOR-LINK
 
| editor2-link  = EDITOR2-LINK
 
| others  = OTHERS
 
| publication-date = PUBLICATION-DATE
 
| date    = DATE
 
| year    = YEAR
 
| month    = MONTH
 
| origyear = ORIGYEAR
 
| title    = TITLE
 
| chapter  = CHAPTER
 
| chapter-url  = CHAPTER-URL
 
| contribution = CONTRIBUTION
 
| contribution-url = CONTRIBUTON-URL
 
| type    = TYPE
 
| journal = JOURNAL
 
| periodical = PERIODICAL
 
| newspaper  = NEWSPAPER
 
| magazine  = MAGAZINE
 
| work = WORK
 
| edition = EDITION
 
| series  = SERIES
 
| volume  = VOLUME
 
| issue  = ISSUE
 
| publisher = PUBLISHER
 
| publication-place = PUBLICATION-PLACE
 
| place    = PLACE
 
| language = LANGUAGE
 
| page  = PAGE
 
| pages = PAGES
 
| nopp  = NOPP
 
| at  = AT
 
| id  = ID
 
| isbn = ISBN
 
| issn = ISSN
 
| oclc = OCLC
 
| pmid = PMID
 
| pmc  = PMC
 
| bibcode = BIBCODE
 
| doi = 10.DOI
 
| doi_inactivedate = 10 June 2015
 
| url = URL
 
| accessdate  = ACCESSDATE
 
| format      = FORMAT
 
| archiveurl  = ARCHIVEURL
 
| archivedate = ARCHIVEDATE
 
| quote      = QUOTE
 
| laysummary = LAYSUMMARY
 
| laysource  = LAYSOURCE
 
| laydate    = LAYDATE
 
| separator  =,
 
| postscript =
 
| ref = REF
 
| notracking = true
 
]==] }, {
 
  
[==[ author=Anonymous|editor=Daniel Coit Gilman, Harry Thurston Peck, Frank Moore Colby |year=1904|title=The New International Encyclopædia |publisher=Dodd, Mead and Company|page=906
+
--[[--------------------------< T E S T _ B A D _ I S M N >----------------------------------------------------
]==] }, {
+
]]
  
[==[  pages=1328–1334|title=Linus Pauling: Selected Scientific Papers|volume=2|editor=Pauling, Linus; Kamb, Barclay |place=River Edge, New Jersey|publisher=World Scientific |year=2001|isbn=981-02-2940-2|url=http://books.google.com/?id=2QduA19d_X8C&pg=PA1329
+
function p:test_bad_ismn()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'ismn=ISMN'}, -- ismn() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title=Soedirman: Bapak Tentara Indonesia |trans_title=Soedirman: Father of the Indonesian Military |language=Indonesian |last=Adi |first=A. Kresna |publisher=Mata Padi Pressindo |isbn=978-602-95337-1-2 |location=Yogyakarta |ref=harv |year=2011
 
]==] }, {
 
  
[==[ url=http://books.google.ca/books?id=WrkzPcxBnLMC |title=Takhta untuk Rakyat: Celah-celah Kehidupan Sultan Hamengku Buwono IX |trans_title=Serving the People: The Life Story of Sultan Hamengku Buwono IX |language=Indonesian |isbn=978-979-22-6767-9 |editor1-first=Mohamad |editor1-last=Roem |editor1-link=Mohamad Roem |editor2-first=Mochtar |editor2-last=Lubis |editor2-link=Mochtar Lubis |editor3-first=Kustiniyati |editor3-last=Mochtar |editor4-first=Maimoen |editor4-last=S. |last=Nasution |first=A. H. |authorlink=Abdul Haris Nasution |publisher=Gramedia Pustaka Utama |location=Jakarta |year=2011 |origyear=1982 |edition=Revised |ref=harv
+
--[[--------------------------< T E S T _ B A D _ I S B N >----------------------------------------------------
| notracking=true]==] }, {
+
]]
  
[==[  author=Luhmann J. G., Russell C. T. |editor=J. H. Shirley and R. W. Fainbridge |title=Venus: Magnetic Field and Magnetosphere |work=Encyclopedia of Planetary Sciences |publisher=Chapman and Hall, New York|year=1997 |url=http://www-spc.igpp.ucla.edu/personnel/russell/papers/venus_mag/ |accessdate=2009-06-28|isbn=978-1-4020-4520-2
+
function p:test_bad_isbn()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'isbn=0–1234567890'}, -- invalid character - ismn() (~/Identifiers)
 +
{'isbn=01234567890X'}, -- length
 +
{'isbn=01234X6789'}, -- X in the wrong spot
 +
{'isbn=978-01234X6789'}, -- isbn13 is digits only
 +
{'isbn=977-0123456789'}, -- 978 or 979 prefix only
 +
{'isbn=979-0123456789'}, -- 9790 is ismn
 +
{'isbn=978-0123456789'}, -- check digit
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  author=Feldman, M. S.; Ferrara, L. A.; Havenstein, P. L.; Volonte, J. E.; Whipple, P. H. |title=Manned Venus Flyby, February 1, 1967 |publisher=Bellcomm, Inc |url=http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19790072165_1979072165.pdf |format=PDF|year=1967
 
]==] }, {
 
  
[==[ last=Rose |first=Herbert Jennings |authorlink=H.J. Rose |title=A Handbook of Greek Mythology |edition=1st |year=1959 |publisher=E.P. Dutton & Co. |location=New York |language= |isbn=0-525-47041-7 |pages=173
+
--[[--------------------------< T E S T _ B A D _ H D L >------------------------------------------------------
]==] }, {
+
]]
  
[==[  url=http://www.ethnologue.com/show_country.asp?name=AR|title=Languages of Argentina|work=Ethnologue: Languages of the World|edition=16th|editor=Lewis, M. Paul|publisher=SIL International|place=Dallas|year=2009
+
function p:test_bad_hdl()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'hdl=HDL'}, -- hdl() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  editor=Jean Chrétien Ferdinand Hoefer |contribution=Labarraque, Antoine-Germain |title=Nouvelle biographie universelle |volume=28 |pages=323–324 |ol=24229911M
 
]==] }, {
 
  
[==[ author=Herbst, T. M.; Rix, H.-W.|year=1999 |editor=Guenther, Eike; Stecklum, Bringfried; Klose, Sylvio|title=Star Formation and Extrasolar Planet Studies with Near-Infrared Interferometry on the LBT |booktitle=Optical and Infrared Spectroscopy of Circumstellar Matter, ASP Conference Series, Vol. 188. |isbn=1-58381-014-5|pages=341–350 |bibcode=1999ASPC..188..341H |publisher=Astronomical Society of the Pacific |location=San Francisco, Calif.
+
--[[--------------------------< T E S T _ B A D _ D O I >------------------------------------------------------
]==] }, {
+
]]
  
[==[  date=4 June 2007|title=The List of Wetlands of International Importance | publisher=The Secretariat of the Convention on Wetlands | page=18 | url=http://www.ramsar.org/sitelist.pdf | accessdate=20 June 2007 | format=PDF | archiveurl=http://web.archive.org/web/20070621011113/http://www.ramsar.org/sitelist.pdf | archivedate=21 June 2007
+
function p:test_bad_doi()
]==] }, {
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'doi=10.5555/12345678'}, -- invalid registrant - doi() (~/Identifiers)
 +
{'doi=10.2343/1234 5678'}, -- space char in suffix
 +
{'doi=11.2343/12345678'}, -- invalid prefix
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  last=Schmidt|first=Hans-Peter|chapter=Mithra i: Mithra in Old Indian and Mithra in Old Iranian|year=2006|title=Encyclopædia Iranica|volume=OT 10|location=New York|publisher=iranica.com|url=http://www.iranicaonline.org/articles/mithra-i|format=
 
]==] }, {
 
  
[==[ last1=Canard |first1=M. |editor1-first=P. |editor1-last=Bearman |editor2-first=Th. |editor2-last=Bianquis |editor3-first=C.E. |editor3-last=Bosworth |editor4-first=E. |editor4-last=van Donzel |editor5-first=W.P. |editor5-last=Heinrichs |editor3-link=Clifford Edmund Bosworth |title=Encyclopaedia of Islam, Second Edition |year=2011 |publisher=Brill Online |location=Leiden |chapter=al-ḎJazīra, Ḏjazīrat Aḳūr or Iḳlīm Aḳūr |oclc=624382576
+
--[[--------------------------< T E S T _ B A D _ D A T E >----------------------------------------------------
]==] }, {
+
]]
  
[==[  last=Block|first=Steven M.|title=The growing threat of biological weapons|url=http://www.americanscientist.org/issues/feature/the-growing-threat-of-biological-weapons|accessdate=2009-05-22|volume=89:1|year=2001|publisher=American Scientist|doi=10.1511/2001.1.28|journal=American Scientist|page=28]==] }, {
+
function p:test_bad_date()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'date=DATE'}, -- citation0()
 +
{'date=2020 |year=2019'}, -- mismatch
 +
{'date=9201 |year=2019'}, -- mismatch with date error
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  year=2011|title=Human Development Report 2011|chapter=Table 1: Human Development Index and its Components|publisher=[[United Nations]]|chapter-url=http://hdr.undp.org/en/media/HDR_2011_EN_Table1.pdf|format=PDF|ref=]==] }, {
 
  
[==[ author=Bhagavan NV|title=Medical Biochemistry |publisher=Harcourt/Academic Press |location=San Diego |year=2002 |isbn=0-12-095440-0|url=http://books.google.com/?id=vT9YttFTPi0C&printsec=frontcover]==] }, {
+
--[[--------------------------< T E S T _ B A D _ C I T E S E E R X >------------------------------------------
 +
]]
  
[==[  author=Motilal (UK) Books of India|title=Tourist Guide Kerala|url=http://books.google.com/books?id=ZYfRBcLdTNYC&pg=PA11|accessdate=18 November 2012|date=1 February 2008|publisher=Sura Books|isbn=978-81-7478-164-2|page=11]==] }, {
+
function p:test_bad_citeseerx()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'citeseerx=CITESEERX'}, -- citeseerx() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  author1=Joseph Needham|author2=Gwei-Djen Lu|author3=Ling Wang|title=Science and civilisation in China, Volume 5, Part 7|year=1987|publisher=Cambridge University Press|isbn=978-0-521-30358-3|pages=48–50]==] }, {
 
  
[==[ chapter=Naturalism and Physicalism | last=Fales | postscript=, | first=Evan ]==] }, {
+
--[[--------------------------< T E S T _ B A D _ B I O R X I V >----------------------------------------------
 +
]]
  
[==[  date=5 October 2009|title=India, Russia Review Defence Ties|publisher=[[The Hindu]]|url=http://www.thehindu.com/news/national/article2514142.ece|accessdate=8 October 2011]==] }, {
+
function p:test_bad_biorxiv()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'biorxiv=BIORXIV'}, -- biorxiv() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  first=Elena|last=Aprile|coauthors=Bolotnikov, Aleksey E.; Doke, Tadayoshi |title=Noble Gas Detectors|publisher=Wiley-VCH|year=2006 |isbn=3-527-60963-6|url=http://books.google.com/?id=tsnHM8x6cHAC&pg=PT1|pages=8–9]==] }, {
 
  
[==[ first=Maurice | last=Loir | title=L'escadre de l'amiral Courbet | location=Paris | publisher=Berger-Levrault | year=1886 | postscript=. ]==] }, {
+
--[[--------------------------< T E S T _ B A D _ B I B C O D E >----------------------------------------------
 +
]]
  
[==[  last = Bennett | first = Ralph | title = Behind the Battle: Intelligence in the War with Germany | place = London | publisher = Random House | origyear = 1994 | year = 1999 | edition = Pimlico: New and Enlarged | isbn = 0-7126-6521-8 ]==] }, {
+
function p:test_bad_bibcode()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'bibcode=..................'}, -- length - bibcode() (~/Identifiers)
 +
{'bibcode=0999...............'}, -- value; missing letter after year
 +
{'bibcode=0999a..............'}, -- year < 1000
 +
{'bibcode=0999ab&............'}, -- journal abbrev must not have '&.'
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  last = Hunt | first = David | author-link = David Hunt (diplomat) | title = The raid on Coventry | newspaper = The Times | pages = 11 | date = 28 August 1976 ]==] }, {
 
  
[==[ last = Rhodes |first = Richard |year = 1986 |title = The Making of the Atomic Bomb |isbn = 0-671-65719-4 |pages = 659–660 |publisher = Simon & Schuster |location = New York]==] }, {
+
--[[--------------------------< T E S T _ B A D _ A S I N >----------------------------------------------------
 +
]]
  
[==[  last = Watt | first = William Montgomery |authorlink = William Montgomery Watt| title = [[Muhammad at Mecca (book)|Muhammad at Mecca]]| publisher=Oxford University Press | year = 1953 | id = | ref = harv]==] }, {
+
function p:test_bad_asin()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'asin=ASIN'}, -- asin() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  last=Cooper |first=J.C. |title=Symbolic and Mythological Animals |pages=25–26 |year=1992 |publisher=Aquarian Press |location=London |isbn=1-85538-118-4]==] }, {
 
  
[==[ last=Horton|first=Michael|authorlink=Michael Horton (theologian)|title=For Calvinism|url=http://books.google.com/books?id=ezoDtwAACAAJ|accessdate=17 January 2013|date=18 October 2011|publisher=Zondervan Books|isbn=978-0-310-32465-2|page=15]==] }, {
+
--[[--------------------------< T E S T _ B A D _ A R X I V >--------------------------------------------------
 +
]]
  
[==[  last=Jacobs|first=Bruno|chapter=Mithra|title=Iconography of Deities and Demons in the Ancient Near East|series=(Electronic Pre-Publication)|location=Leiden|publisher=U Zürich/Brill| year=2006|url=http://www.religionswissenschaft.unizh.ch/idd/prepublications/e_idd_mithra.pdf Iconography of Mithra]==] }, {
+
function p:test_bad_arxiv()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'arxiv=ARXIV'}, -- arxiv() (~/Identifiers)
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  last=Malandra|first=William|year=1983|isbn=0-8166-1115-7|title=An Introduction to Ancient Iranian Religion|location=Minneapolis|publisher=University of Minnesota Press]==] }, {
 
  
[==[ last=Metzner|first =Paul|year=1998|title=Crescendo of the Virtuoso: Spectacle, Skill, and Self-Promotion in Paris during the Age of Revolution|publisher=University of California Press]==] }, {
+
--[[--------------------------< T E S T _ A R X I V _ M I S S I N G >------------------------------------------
 +
]]
  
[==[  last=Raichlen|first=S.|date=10 May 2011|title=A Tandoor Oven Brings India's Heat to the Backyard|publisher=The New York Times|url=http://www.nytimes.com/2011/05/11/dining/a-tandoor-oven-brings-indias-heat-to-the-backyard.html|accessdate=14 June 2011]==] }, {
+
function p:test_arxiv_missing()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite arxiv/new |', '}}', '{{cite arxiv |', '}}',
 +
{
 +
{'author=Author |title=Title'}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  last=Sripati|first=V.|year=1998|title=Toward Fifty Years of Constitutionalism and Fundamental Rights in India: Looking Back to See Ahead (1950–2000)|journal=American University International Law Review|volume=14|issue=2|pages=413–496]==] }, {
 
  
[==[ last1=Ali|first1=J. R.|last2=Aitchison|first2=J. C.|year=2005|title=Greater India|journal=Earth-Science Reviews|volume=72|issue=3–4|pages=170–173|doi=10.1016/j.earscirev.2005.07.005]==] }, {
+
--[[--------------------------< T E S T _ A R C H I V E _ U R L >----------------------------------------------
 +
]]
  
[==[  last1=Eitzen|first1=E.|last2=Takafuji|first2=E.|title=Military Medicine: Medical Aspects of Chemical and Biological Warfare|url=|year=1997|publisher=Office of the Surgeon General, Department of the Army|chapter=Historical Overview of Biological Warfare]==] }, {
+
function p:test_archive_url()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'archive-url=//web.archive.org/save/'}, -- save - archive_url_check()
 +
{'archive-url=//liveweb.archive.org/'}, -- obsolete liveweb url
 +
{'archive-url=//web.archive.org/2020'}, -- old form url short time stamp
 +
{'archive-url=//web.archive.org/web/2020'}, -- new form url short time stamp
 +
{'archive-url=//web.archive.org/20200611000000id_/'}, -- old form without path and with flag
 +
{'archive-url=//web.archive.org/path/20200611000000id_/'}, -- new form with malformed path and with flag
 +
{'archive-url=//web.archive.org/web/20200611000000_id/'}, -- new form with path and with malformed flag
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  last1=Heitzman|first1=J.|last2=Worden|first2=R. L.|date=August 1996|title=India: A Country Study|series=Area Handbook Series|publisher=[[Library of Congress]]|place=Washington, D.C.|isbn=978-0-8444-0833-0]==] }, {
 
  
[==[ last1=Masters|first1=Bruce Alan|last2=Ágoston|first2=Gábor|year=2009|title=Encyclopedia of the Ottoman Empire|publisher=Infobase Publishing|location=New York|isbn=978-1-4381-1025-7|ref=harv]==] }, {
+
--[[--------------------------< T E S T _ A R C H I V E _ M I S S I N G _ U R L >------------------------------
 +
]]
  
[==[  ref=harv |url=http://books.google.ca/books?id=LjzZ_rVv_2MC&pg=PA30 |title=Villes et organisation de l'espace en Afrique |pages=30–31 |first1=Jérôme |last1=Aloko-N'Guessan |first2=Amadou |last2=Diallo |first3=Kokou Henri |last3=Motcho |publisher=KARTHALA Editions |year=2010 |ISBN=2-8111-0339-2]==] }, {
+
function p:test_archive_missing_url()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'archive-url=//archive.org |archive-date=2020-06-10 |url-status=live'}, -- live - citation0()
 +
{'archive-url=//archive.org |archive-date=2020-06-10'}, -- anything else
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title = Statics: Analysis and Design of Systems in Equilibrium | last = Sheppard and Tongue | publisher = Wiley and Sons | year = 2005 | page = 618 | quote = In general, for given contacting surfaces, ''μ''<sub>k</sub> < ''μ''<sub>s</sub> | isbn = 0-471-37299-4]==] }, {
 
  
[==[ title=Ancient Egyptian Rhetoric in the Old and Middle Kingdoms|author=David Hutto‌|journal=[[Rhetorica]]|date=Summer 2002|volume=20|issue=3|publisher=[[University of California Press]]|pages=213–233|doi=10.1525/rh.2002.20.3.213]==] }, {
+
--[[--------------------------< T E S T _ A P O S T R O P H E _ M A R K U P >----------------------------------
 +
]]
  
[==[  title=Civilizations of ancient Iraq |last1=Foster |first1=Benjamin R. |last2=Polinger Foster |first2=Karen |year=2009 |publisher=Princeton University Press |location=Princeton |isbn=978-0-691-13722-3 ]==] }, {
+
function p:test_apostrophe_markup()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite news/new |title=Title |', '}}', '{{cite news |title=Title |', '}}',
 +
{
 +
{'newspaper=\'\'Newspaper\'\''}, -- citation0()
 +
{'publisher=\'\'\'Newspaper\'\'\''}, -- citation0()
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title=India | publisher=[[International Monetary Fund]] | url=http://www.imf.org/external/pubs/ft/weo/2011/02/weodata/weorept.aspx? | accessdate=14 October 2011]==] }, {
 
  
[==[ title=New Interstellar Boundary Explorer data show heliosphere's long-theorized bow shock does not exist | date=May 10, 2012 | work=Phys.org | url=http://phys.org/news/2012-05-interstellar-boundary-explorer-heliosphere-long-theorized.html | accessdate=2012-02-11 ]==] }, {
+
--[[--------------------------< T E S T _ A C C E S S D A T E _ M I S S I N G _ U R L >------------------------
 +
]]
  
[==title=The European Flag|publisher=[[Europa (web portal)]]|url=http://europa.eu/abc/symbols/emblem/index_en.htm|accessdate=4 August 2007]==] }, {
+
function p:test_accessdate_missing_url()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
 +
{
 +
{'access-date=2020-06-11'}, -- citation0()
 +
{'pmc=12345 |access-date=2020-06-11'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  url = http://english.president.go.kr/tours/place_buildings/main_office.php | title = Cheong Wa Dae / The Blue House | quote = The Main Building and its two annexes are covered with a total of 150,000 traditional Korean blue roof tiles (hence, the name "Blue House" is also commonly used when referring to Cheongwadae). ]==] }, {
+
--[[==========================<< M A I N T  C A T  M E S S A G E S >>========================================
 +
]]
 +
--[[--------------------------< T E S T _ A S I N _ U S E S _ I S B N >----------------------------------------
 +
]]
  
[==[  url=https://www.regione.sardegna.it/j/v/86?v=9&c=72&s=1&file=1997026 |title=Legge Regionale 15 ottobre 1997, n. 26 |year=1997 |publisher=Regione Sardegna |accessdate=]==] }, {
+
function p:test_ASIN_uses_ISBN()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'asin=412346789X'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  inventor1-last = Doe II | inventor1-first = John D. | title = Title of Invention | issue-date = 1999 | patent-number = 5900999 | country-code = US ]==] }, {
 
  
[==[ last = Doe II | first = John D. | title = Title of Invention | issue-date = 1999 | patent-number = 5900999 | country-code = US ]==] }, {
+
--[[--------------------------< T E S T _ A R C H I V E D _ C O P Y >------------------------------------------
 +
]]
  
[==[  invent1=Smith, Bob | inventor2-last=Doe |inventor2-first=Dalny | title=Apparatus for conducting analytical procedures | issue-date=1965 | patent-number=3100999 | country-code=US
+
function p:test_Archived_copy()
]==] }, { [==[
+
    self:preprocess_equals_preprocess_many(
    title = Studies on Archaic Chinese
+
    '{{cite book/new |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}', '{{cite book |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}',
  | last = Li | first = Fang-Kuei | authorlink = Li Fang-Kuei
+
{
  | others = Gilbert L. Mattos (trans.)
+
{'title=Archived copy'},
  | journal = Monumenta Serica | volume = 31 | year = 1974–75
+
},
  | pages = 219–287
+
{nowiki=false, templatestyles=true}
  | postscript = .
+
)
]==] }, { [==[
 
    title = Studies on Archaic Chinese
 
  | last = Li | first = Fang-Kuei | authorlink = Li Fang-Kuei
 
  | others = Gilbert L. Mattos (trans.)
 
  | journal = Monumenta Serica | volume = 31 | year = 1974–1975
 
  | pages = 219–287
 
  | postscript = .
 
]==] } }, {nowiki=false})
 
 
end
 
end
  
  
function p:test_press()
+
--[[--------------------------< T E S T _ A U T H O R S >------------------------------------------------------
     self:preprocess_equals_preprocess_many('{{cite press release/new|', '}}', '{{cite press release|', '}}', { {
+
]]
 +
 
 +
function p:test_Authors()
 +
     self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'authors=Authors'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[
 
| last        = LAST
 
| first      = FIRST
 
| title      = TITLE
 
| trans_title = TRANS_TITLE
 
| language    = LANGUAGE
 
| date        = DATE
 
| publisher  = PUBLISHER
 
| location    = LOCATION
 
| url        = URL
 
| format      = FORMAT
 
| accessdate  = ACCESSDATE
 
| archiveurl  = ARCHIVEURL
 
| archivedate = ARCHIVEDATE
 
| deadurl    = DEADURL
 
| quote      = QUOTE
 
| ref        = REF
 
| docket      = DOCKET
 
]==] }, {
 
  
[==[ title= Guerrero, Estado atractivo para la inversión turística |publisher= Secretaría de Turismo Estado de Guerrero |date=September 9, 2008 |url= http://www.presidencia.gob.mx/prensa/sectur/?contenido=38527 |language=Spanish |trans_title=Guerrero, an attractive state for tourism investments |accessdate=June 24, 2004 ]==] }, {
+
--[[--------------------------< T E S T _ B O T : U N K N O W N >----------------------------------------------
 +
]]
  
[==[  title=Apple to Unveil Next Generation Software at Keynote Address on Monday, June 6 |url=http://www.apple.com/pr/library/2011/05/31wwdc.html |publisher=[[Apple Inc.]] |date=May 31, 2011 |accessdate=May 31, 2011]==] }, {
+
function p:test_Bot_unknown()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}', '{{cite book |title=Title |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}',
 +
{
 +
{'url-status=bot: unknown'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title=DOE Seeks Applicants for Solicitation on the Employment Effects of a Transition to a Hydrogen Economy |work=Hydrogen Program |publisher=US Department of Energy |date=2006-03-22 |url=http://web.archive.org/web/20110719105413/http://www.hydrogen.energy.gov/news_transition.html |accessdate=2008-03-16]==] }, {
 
  
[==[ title=Warner Bros. Consumer Products Flies High with DC's Superman at Licensing 2005 International; Franchise Set to Reach New Heights in 2005 Leading Up to Feature Film Release of Superman Returns in June 2006 |publisher=Warner Bros. |date= June 16, 2005 |url=http://www.findarticles.com/p/articles/mi_m0EIN/is_2005_June_16/ai_n13816862 | accessdate=January 16, 2007 |quote=With a super hero that transcends all demographics" ... and ... "S-Shield, which continues to be a fashion symbol and hot trend ]==] }, {
+
--[[--------------------------< T E S T _ D A T E _ F O R M A T >----------------------------------------------
 +
]]
  
[==[ first=ธารทิพย์|title=กรมการขนส่งทางบก ระบุเพียง 11 วันของการเริ่มโครงการ "ยกเครื่อง แท็กซี่ไทย"... |url=http://www.dlt.go.th/th/attachments/plan48-51/3320_%E0%B80%B8%88%E0%B8%88%B8%8B%E0%B8%B5%E0%B9%88%201-12&#91;1&#93;.pdf|publisher=Public Relations Subdivision, Department of Land Transport|issue=94|date=14 June 2012|accessdate=16 September 2012]==] }, {
+
function p:test_Date_format()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'date=Jun-Jul 2020'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title=WSTS Semiconductor Market Forecast World Release Date: 1 June 2004 - 6:00 UTC | work=Miyazaki, Japan, Spring Forecast Meeting 18–21 May 2004 | author=WSTS Board Of Directors | publisher=World Semiconductor Trade Statistics | url=http://www.wsts.org/press.html | archiveurl=http://web.archive.org/web/20041207091926/http://www.wsts.org/press.html | archivedate=2004-12-07]==] }, {
 
  
[==[ url = http://electriclichen.com/linuxbierwanderung/va_release/release.html | archiveurl=http://web.archive.org/web/20110718034114/http://electriclichen.com/linuxbierwanderung/va_release/release.html| archivedate=2011-07-18| deadurl=yes |title = VA Research Linux Systems announces support for The Linux Beer Hike. | date = 1998-11-12 | location = Mountain View, California | publisher = VA Research Inc. | accessdate = 2013-03-12 ]==] }, {
+
--[[--------------------------< T E S T _ D A T E _ Y E A R >--------------------------------------------------
 +
]]
  
[==[  url=http://www.microsoft.com/presspass/bod/bod.aspx|title=Microsoft Board of Directors|work=PressPass|publisher=Microsoft |accessdate=July 3, 2010 ]==] }, {
+
function p:test_Date_year()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'date=2020 |year=2020'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  author= Staff |publisher= Michigan Economic Development Corporation |year= 2005 |url= http://www.globeinvestor.com/servlet/ArticleNews/print/PRNEWS/20050303/2005_03_03_12_0813_1322091 |title= Michigan#2 in the Nation for New Corporate Facilities and Expansions in 2004]==] }, {
 
  
[==[ date=2003-03-05 | title=Astronomers Peg Brightness of History’s Brightest Star | url=http://www.noao.edu/outreach/press/pr03/pr0304.html | publisher=[[National Optical Astronomy Observatory]] ]==] }, {
+
--[[--------------------------< T E S T _ D I S P _ N A M E >--------------------------------------------------
 +
]]
  
[==[  date=26 November 2010 |title=LHC experiments bring new insight into primordial universe |url=http://press.web.cern.ch/press/pressreleases/releases2010/PR23.10E.html |publisher=[[CERN]] |accessdate=2012-04-02 ]==] }, {
+
function p:test_Disp_name()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'author=Author |display-authors=1'},
 +
{'author=Author |contribution=Contribution |contributor=Contributor |display-contributors=1'},
 +
{'editor=Editor |display-editors=1'},
 +
{'interviewer=Interviewer |display-interviewers=1'},
 +
{'translator=Translator |display-translators=1'},
 +
{'author=Black AB |display-authors=etalia'},
 +
{'author=Black AB |display-authors=etal'},
 +
{'author=Black AB |author2=Red CD |display-authors=1'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  first=Edward | last=Tedesco | coauthors=Metcalfe, Leo | title=New study reveals twice as many asteroids as previously believed | publisher=European Space Agency | date=April 4, 2002 | url=http://www.spaceref.com/news/viewpr.html?pid=7925 | accessdate=2008-02-21]==] }, {
 
  
[==[ publisher = Embrey, Bruce | date = May, 2006 | title = Sue Kunitomi Embrey Obituary | accessdate = April 23, 2007 | notracking=true]==] }, {
+
--[[--------------------------< T E S T _ E M B A R G O >------------------------------------------------------
 +
]]
  
[==[  publisher=[[Carter Center|The Carter Center]] |year=2004 |title=The Carter Center 2004 Indonesia Election Report |url=http://www.cartercenter.org/documents/2161.pdf |format=PDF|accessdate=13 December 2006]==] }, {
+
function p:test_pmc_embargo_date()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'pmc=12345 |pmc-embargo-date=1 January 2020'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  publisher=BBC News |date=30 March 2010 |title=CERN LHC sees high-energy success |url=http://news.bbc.co.uk/2/hi/science/nature/8593780.stm |accessdate=2010-03-30]==] }, {
 
  
[==[ publisher=FDA |date=October 6, 2006 |url=http://www.fda.gov/NewsEvents/Newsroom/PressAnnouncements/2006/ucm108759.htm |title=FDA approves the first drug to treat irritability associated with autism, Risperdal |accessdate=2009-08-14]==] }, {
+
--[[--------------------------< T E S T _ E X T R A _ P U N C T >----------------------------------------------
 +
]]
  
[==[  publisher=Mainland Affairs Council, ROC Executive Yuan |date=29 March 2005 |title=The Official Position of the Republic of China on China's Passing of the Anti-secession (Anti-Separation) Law |url=http://www.mac.gov.tw/ct.asp?xItem=68048&ctNode=5910&mp=3|quote=Section II-2: "'The Republic of China is an independent and sovereign state. Taiwan's sovereignty belongs to the 23 million people of Taiwan. Only the 23 million citizens of Taiwan may decide on the future of Taiwan.' This statement represents the greatest consensus within Taiwan's society today concerning the issues of national sovereignty and the future of Taiwan. It is also a common position shared by both the ruling and opposition parties in Taiwan. A recent opinion poll shows that more than 90% of the people of Taiwan agree with this position.]==] }, {
+
function p:test_Extra_punct()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'last=Surname,'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  publisher=UANews | date=2001-11-09 | title=UA-Led Team's Ultra-High Resolution Camera Selected for 2005 Launch to Mars | url=http://uanews.org/cgi-bin/WebObjects/UANews.woa/4/wa/MainStoryDetails?ArticleID=4493 | accessdate=2006-06-08]==] }, {
 
  
[==[ title = 2008/40 – Qantas Airbus Incident Media Conference | publisher=[[Australian Transport Safety Bureau]] | date = 8 October 2008 | url = http://www.atsb.gov.au/newsroom/2008/release/2008_40.aspx | accessdate =8 October 2008 ]==] }, {
+
--[[--------------------------< T E S T _ E X T R A _ T E X T >------------------------------------------------
 +
]]
  
[==[  title = American Jewish Committee, Japanese American National Museum Issue Joint Statement About Ellis Island Exhibit Set To Open April 3 | publisher = Japanese American National Museum and American Jewish Committee | url = http://www.janm.org/press/release/52 | date = March 13, 1998 | accessdate = December 30, 2007]==] }, {
+
function p:test_Extra_text()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'page=p. 35'},
 +
{'edition=1st ed.'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title = Document – Jamaica: Amnesty International condemns homophobic violence | publisher = Amnesty International | date = 15 April 2007 | url = http://www.amnesty.org/en/library/asset/AMR38/004/2007/en/496206cb-d39d-11dd-a329-2f46302a8cc6/amr380042007en.html | accessdate = 2009-03-19]==] }, {
 
  
[==[ title = Qantas Frequent Flyer — now bigger and better | publisher=Qantas | date = 1 July 2008 | url = http://www.qantas.com.au/regions/dyn/au/publicaffairs/details?ArticleID=2008/jul08/3777| accessdate =1 July 2008]==] }, {
+
--[[--------------------------< T E S T _ E X T R A _ T E X T _ N A M E S >------------------------------------
 +
]]
  
[==[  title = SIGA’s Smallpox Drug Candidate Administered to Critically Ill Human Patient | publisher = SIGA Technologies | date = 2007-03-17 | url = http://www.siga.com/press/031907.html| accessdate = 2007-06-05 ]==] }, {
+
function p:test_Extra_text_names()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'author=Author (ed)'},
 +
{'author=Author |contribution=Contribution |contributor=Contributor (ed)'},
 +
{'editor=Editor (ed)'},
 +
{'interviewer=Interviewer (ed)'},
 +
{'translator=Translator (ed)'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title = Starbucks Agrees to Hold the Hormones For Good | publisher=Food & Water Watch | date = August 24, 2007 | url = http://www.foodandwaterwatch.org/press/releases/starbucks-agrees-to-hold-the-hormones-for-good-article08242007 | archiveurl = http://web.archive.org/web/20070913221949/http://www.foodandwaterwatch.org/press/releases/starbucks-agrees-to-hold-the-hormones-for-good-article08242007 | archivedate = September 13, 2007 | accessdate =August 27, 2007]==] }, {
 
  
[==[ title =D'oh! Bugs Bunny Edges Out Homer Simpson | publisher =TV Guide | date =July 26, 2002 ]==] }, {
+
--[[--------------------------< T E S T _ I G N O R E _ I S B N _ E R R >--------------------------------------
 +
]]
  
[==[  title =FANTAGRAPHICS BOOKS TO PUBLISH THE COMPLETE PEANUTS BY CHARLES M. SCHULZ | publisher =Fantagraphics | date =October 13, 2003 | url =http://www.snoopy.com/comics/peanuts/news/news_101303.html | accessdate =2006-11-30 ]==] }, {
+
function p:test_Ignore_isbn_err()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'isbn=978-0123456789 |ignore-isbn-error=yes'}, -- check digit
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title =Indonesia Annual International Religious Freedom Report 2003 |publisher =Bureau of Democracy, Human Rights and Labor, Embassy of the United States |date =18 December 2003 |location =Jakarta, Indonesia |url =http://www.usembassyjakarta.org/press_rel/religious_report2003.html |accessdate =25 April 2007 ]==] }, {
 
  
[==[ title= Qantas Group Restructures Fleet Plan|publisher= Qantas Corporate Communication|date= {{date|2012-8-23}}]==] }, {
+
--[[--------------------------< T E S T _ L O C A T I O N >----------------------------------------------------
 +
]]
  
[==[  title= Rinderpest eradicated, what's next?|url=http://www.fao.org/news/story/en/item/80894/icode/|publisher=[[Food and Agriculture Organization]] (FAO)|date=28 June 2011 |accessdate=30 June 2011]==] }, {
+
function p:test_Location()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'location=Sec. 6'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title=Carbon Capture Strategy Could Lead to Emission-Free Cars |publisher=Georgia Tech |date=2008-02-11 |url=http://www.gatech.edu/newsroom/release.html?id=1707 |accessdate=2008-03-16]==] }, {
 
  
[==[ title=FAA selects the HAS as 2005 Airport of the Year|publisher=Houston Airport System|date=2006-03-24|url=http://www.fly2houston.com/0/8343/0/1906D1940/|accessdate=2006-12-16]==] }, {
+
--[[--------------------------< T E S T _ M U L T _ N A M E S >------------------------------------------------
 +
]]
  
[==[  title=Gartner Says Worldwide PC Market Grew 13 Percent in 2007|publisher= Economic Times|date=January 16, 2010|url= http://economictimes.indiatimes.com/infotech/hardware/Worldwide-PC-shipments-jump-158-in-Q4-IDC/articleshow/5442476.cms|accessdate=January 18, 2010]==] }, {
+
function p:test_Mult_names()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'author=Name, Name, Name'},
 +
{'author=Author |contribution=Contribution |contributor=Name, Name, Name'},
 +
{'editor=Name, Name, Name'},
 +
{'interviewer=Name, Name, Name'},
 +
{'translator=Name, Name, Name'},{'author=Name; Name'},
 +
{'author=Author |contribution=Contribution |contributor=Name; Name'},
 +
{'editor=Name; Name'},
 +
{'interviewer=Name; Name'},
 +
{'translator=Name; Name'},
 +
{'author=Name; Name, Name'},
 +
{'author=Name; Name, Name, Name'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title=InBev Completes Acquisition of Anheuser-Busch |url=http://www.ab-inbev.com/documents/press_release.pdf |publisher=AB-InBev |date=18 November 2008 |accessdate=21 June 2012]==] }, {
 
  
[==[ title=InBev dividend 2006: 0.72 euro per share—infobox: About InBev |quote=InBev is a publicly traded company ([[Euronext]]: INB) based in [[Leuven]], Belgium. The company's origins date back to 1366, and today it is the leading global brewer by volume. |date=24 April 2007 |publisher=InBev |url=http://www.inbev.com/press_releases/20070424.1.e.cfm |accessdate=31 May 2007]==] }, {
+
--[[--------------------------< T E S T _ N U M E R I C _ N A M E S >------------------------------------------
 +
]]
  
[==[  title=NASA Research Indicates Oxygen on Earth 2.5 Billion Years ago|url=http://www.nasa.gov/home/hqnews/2007/sep/HQ_07215_Timeline_of_Oxygen_on_Earth.html|publisher=[[NASA]]|date=2007-09-27|accessdate=2008-03-13]==] }, {
+
function p:test_Numeric_names()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'author=1234'},
 +
{'author=Author |contribution=Contribution |contributor=1234'},
 +
{'editor=1234'},
 +
{'interviewer=1234'},
 +
{'translator=1234'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title=No More Deaths From Rinderpest|url=http://www.oie.int/for-the-media/press-releases/detail/article/no-more-deaths-from-rinderpest/|publisher=World Organisation for Animal Health|accessdate=25 May 2011]==] }, {
 
  
[==[ title=Opinion on Stevia Rebaudiana plants and leaves |publisher=European Commission Scientific Committee on Food |date=17 June 1999 |url=http://www.bfr.bund.de/cm/208/stevia_rebaudiana_june_1999.pdf |format=PDF |accessdate=27 January 2008]==] }, {
+
--[[--------------------------< T E S T _ O T H E R S >--------------------------------------------------------
 +
]]
  
[==[  title=SAF Accredited and Candidate Forestry Degree Programs |publisher=Society of American Foresters |date=2008-05-19 |url=http://www.safnet.org/education/forestry_degree_programs.pdf |format=PDF |language= |accessdate= |archiveurl= |archivedate= |quote=The Society of American Foresters grants accreditation only to specific educational curricula that lead to a first professional degree in forestry at the bachelor's or master's level.]==] }, {
+
function p:test_Others()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'others=Name'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title=Scartel and HTC Launch World's First Integrated GSM/WiMAX Handset|url=http://www.htc.com/www/press.aspx?id=76204&lang=1033 |publisher=HTC Corporation |date=12 November 2008 |accessdate=1 March 2011]==] }, {
 
  
[==[ title=Severe Pain Relief may be Possible with a Common Anesthetic Drug |publisher=[[Blackwell Publishing]] |date=1 October 2004 |url=http://blackwellpublishing.com/press/pressitem.asp?ref=180 |accessdate=13 December 2009]==] }, {
+
--[[--------------------------< T E S T _ P M C _ F O R M A T >------------------------------------------------
 +
]]
  
[==[  title=Toshiba and Fujitsu reach HDD deal: Nikkei|publisher=Reuters|date=January 14, 2009|url= http://www.reuters.com/article/innovationNews/idUSTRE50D5LN20090114|accessdate= January 14, 2009]==] }, {
+
function p:test_Pmc_format()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'pmc=PMC12345'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  title=Travel Warning: Indonesia |publisher=US Embassy, Jakarta |date=10 May 2005 |url=http://www.usembassyjakarta.org/news/trv_warning02.html |accessdate=26 December 2006|archiveurl = http://web.archive.org/web/20061111230327/http://www.usembassyjakarta.org/news/trv_warning02.html |archivedate = 11 November 2006|deadurl=yes]==] }, {
 
  
[==[ title=U.S. Census Bureau Announces 2010 Census Population Counts – Apportionment Counts Delivered to President|url=http://2010.census.gov/news/releases/operations/cb10-cn93.html |publisher=[[United States Census Bureau]]|date=December 21, 2010|accessdate=November 23, 2012| archiveurl= http://web.archive.org/web/20101224044247/http://2010.census.gov/news/releases/operations/cb10-cn93.html| archivedate= December 24, 2010 <!--DASHBot-->| deadurl= no]==] }, {
+
--[[--------------------------< T E S T _ R E F _ H A R V >----------------------------------------------------
 +
]]
  
[==[  url = http://nds.coi.gov.uk/environment/fullDetail.asp?ReleaseID=181549&NewsAreaID=2&NavigatedFromDepartment=False | publisher = [[Strategic Rail Authority]] | date = 29 March 1999 | accessdate = 17 June 2008 | title = Sustained Passenger Growth in London ]==] }, {
+
function p:test_Ref_harv()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'ref=harv'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  url= http://www.networkrailmediacentre.co.uk/Content/Detail.asp?ReleaseID=2408&NewsAreaID=2&SearchCategoryID=2 |publisher= [[Network Rail]] |date= 18 October 2006 |accessdate= 16 June 2011 |title= The £3.5bn Thameslink Project clears major hurdle |archiveurl= http://web.archive.org/web/20070304113209/http://www.networkrailmediacentre.co.uk/Content/Detail.asp?ReleaseID=2408&NewsAreaID=2&SearchCategoryID=2 |archivedate =4 March 2007]==] }, {
 
  
[==[ url= http://www.thomasnelsoncorporate.com/2012/07/harpercollins-finalizes-acquisition-of-thomas-nelson/ |title=HarperCollins Finalizes Acquisition of Thomas Nelson |author=Casey Francis |publisher=Thomas Nelson, Inc. |date=July 11, 2012 |accessdate=August 6, 2012]==] }, {
+
--[[--------------------------< T E S T _ U N F I T >----------------------------------------------------------
 +
]]
  
[==[  url=http://ir.zipcar.com/releasedetail.cfm?ReleaseID=719904 |title=Zipcar Reports 2012 Third Quarter Results |publisher=Ir.zipcar.com |date=2012-11-08 |accessdate=2013-01-12]==] }, {
+
function p:test_Unfit()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}', '{{cite book |title=Title |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}',
 +
{
 +
{'url-status=unfit'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  url=http://www.businesswire.com/news/home/20120105005547/en/Nielsen-Company-Billboard%E2%80%99s-2011-Music-Industry-Report|title=The Nielsen Company & Billboard's 2011 Music Industry Report|publisher=[[Business Wire]]|archiveurl=http://www.webcitation.org/64TshZep3|archivedate=January 6, 2012]==] }, {
 
  
[==[ url=http://www.emmys.org/media/releases/2006/crtvarts2006_rel.pdf|title=The 2006 Creative Arts Emmy winners press release|publisher=Emmys.org|date=August 19, 2006|accessdate=August 23, 2007|format=PDF]==] }, {
+
--[[--------------------------< T E S T _ U N K N O W N _ L A N G >--------------------------------------------
 +
]]
  
[==[  url=http://www.gu.se/english/about_the_university/current/the-university-s-new-english-name.cid778745 | publisher=University of Gothenburg | title=University of Gothenburg – the University's new English name | date=4 February 2008 | accessdate=18 May 2011]==] }, {
+
function p:test_Unknown_lang()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'language=Taglish'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  url=http://www.newscorp.com/news/news_077.html|title=News Corporation Announces Plans To Acquire William Morrow & Company And Avon Books From The Hearst Corporation|date=June 17, 1999|publisher=News Corporation|accessdate=August 6, 2012|location=New York|archiveurl=http://web.archive.org/web/20061209220010/http://www.newscorp.com/news/news_077.html|archivedate=Dec 09, 2006]==] }, {
 
  
[==[ url=http://www.nxp.com/news/press-releases/2009/03/nxp-and-roku-enable-instant-enjoyment-of-new-release-movies.html |title=NXP and Roku Enable Instant Enjoyment of New Release Movies |date=2009-03-04 |accessdate=2011-11-11 |quote=The Roku digital video player, powered by the PNX8935 multi-format source decoder from NXP]==] }, {
+
--[[--------------------------< T E S T _ U N T I T L E D >----------------------------------------------------
 +
]]
  
[==[  url=http://www.sony.net/SonyInfo/News/Press_Archive/200108/01-0828/|title=Sony and Ericsson complete joint venture agreement |date=28 August 2001|publisher=Sony|accessdate=26 May 2012]==] }, {
+
function p:test_Untitled()
 +
    self:preprocess_equals_preprocess_many(
 +
    '{{cite journal/new |journal=Journal |', '}}', '{{cite journal |journal=Journal |', '}}',
 +
{
 +
{'title=none'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 +
end
  
[==[  date=18 April 2005 |url=http://www.bnl.gov/bnlweb/pubaf/pr/pr_display.asp?prid=05-38 |title=RHIC Scientists Serve Up "Perfect" Liquid |publisher=[[Brookhaven National Laboratory]] |accessdate=2009-09-15 ]==] }, {
 
  
[==[ date=26 November 2010 |title=LHC experiments bring new insight into primordial universe |url=http://press.web.cern.ch/press/pressreleases/releases2010/PR23.10E.html |publisher=[[CERN]] |accessdate=2012-04-02 ]==] }, {
+
--[[--------------------------< T E S T _ Z B L >--------------------------------------------------------------
 +
]]
  
[==[  date=30 March 2006 |url=http://www.fnal.gov/pub/presspass/press_releases/minos_3-30-06.html |title=MINOS experiment sheds light on mystery of neutrino disappearance |accessdate=2009-08-03 ]==] }
+
function p:test_Zbl()
}, {nowiki=false})
+
    self:preprocess_equals_preprocess_many(
 +
    '{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
 +
{
 +
{'zbl=07013361'},
 +
},
 +
{nowiki=false, templatestyles=true}
 +
)
 
end
 
end
  
 
return p
 
return p

Latest revision as of 13:39, 24 September 2020

Documentation for this module may be created at Module:Citation/CS1/testcases2/doc

--[=[
Unit tests for [[Module:Citation/CS1]] error messages.  This is not intended to test every possible thing that
can make an error message; rather, it is to test the creation and rendering of the messages themselves.

Click talk page to run tests.

]=]

local p = require('Module:UnitTests')

--[[--------------------------< W I K I L I N K _ I N _ U R L >------------------------------------------------
]]

function p:test_wikilink_in_url()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |journal=Journal |', '}}', '{{cite journal |journal=Journal |', '}}',
		{
			{'title=Title |url=//example.com |title-link=Title'},				-- citation0()
			{'pmc=12345 |title=Title |url=//example.com |title-link=Title'},	-- citation0()
			{'title=[[Title]] |url=//example.com'},								-- safe_for_url()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ V A U T H O R S >----------------------------------------------------
]]

function p:test_vauthors()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'vauthors=Black ABC'},												-- too many initials
			{'vauthors=Black A-B'},												-- hyphenated initials
			{'vauthors=Black AB II'},											-- invalid generational suffix - does not show and error but it should
			{'vauthors=Black AB 3d'},											-- invalid generational suffix
			{'vauthors=Black, AB, Brown, CD'},									-- improper puncutation - does not show and error but it should
			{'vauthors=Black AB; Brown CD'},									-- improper puncutation
			{'vauthors=Вlack AВ, Вrown CD,'},									-- the 'В's are Cyrillic characters
			{'vauthors=Black AB Brown CD'},										-- missing comma
			{'vauthors=Black A B'},												-- spaced initials
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ V A N C O U V E R >--------------------------------------------------
]]

function p:test_vancouver()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |name-list-format=vanc |', '}}', '{{cite book |title=Title |name-list-format=vanc |', '}}',
		{
			{'last=Black |first=AB 3d'},										-- invalid generational suffix - reduce_to_initials()
			{'last=Вlack |first=Alpha Вravo'},									-- the 'В's are Cyrillic characters
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ T R A N S _ M I S S I N G _ T I T L E >------------------------------
]]

function p:test_trans_missing_title()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |', '}}', '{{cite book |', '}}',
		{
			{'trans-title=Trans Title'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ T E X T _ I G N O R E D >--------------------------------------------
]]

function p:test_text_ignored()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'text to be ignored'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ S S R N _ M I S S I N G >--------------------------------------------
]]

function p:test_ssrn_missing()
    self:preprocess_equals_preprocess_many(
    	'{{cite ssrn/new |title=Title', '}}', '{{cite ssrn |title=Title', '}}',
		{
			{''},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ S C R I P T _ P A R A M E T E R >------------------------------------
]]

function p:test_script_parameter()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'script-title=ja:'},												-- missing title part
			{'script-title=ac:script-title'},									-- unknown language code
			{'script-title=es:script-title'},									-- invalid language code
			{'script-title=script-title'},										-- missing prefix
		},
		{nowiki=false, templatestyles=true}
	)
end

--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S >----------------------------
]]

function p:test_redundant_parameters()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'type=Type |meduim=Meduim'},										-- argument_wrapper()
			{'last=Last |last1=Last1'},											-- extract_names()
			{'last=Last |first=First |first1=First1'},							-- extract_names()
			{'last=Last |first=First |author-mask=Author-mask |author-mask1=Author-mask1'},		-- extract_names()
			{'last=Last |first=First |author-link=Author |author1-link=Author'},				-- extract_names()
			{'vauthors=[[Author|Author AA]] |author-link=Author'},				-- parse_vauthors_veditors()
			{'vauthors=Black AB |author2=Brown CD'},							-- select_author_editor_source()
			{'page=1 |pages=3, 4'},												-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 2 >------------------------
]]

function p:test_redundant_parameters_2()
    self:preprocess_equals_preprocess_many(
    	'{{cite mailinglist/new |title=Title |', '}}', '{{cite mailinglist |title=Title |', '}}',
		{
			{'mailinglist=Mailinglist |work=work'},								-- argument_wrapper()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 3 >------------------------
]]

function p:test_redundant_parameters_3()
    self:preprocess_equals_preprocess_many(
    	'{{cite encyclopedia/new |title=Title |', '}}', '{{cite encyclopedia |title=Title |', '}}',
		{
			{'encyclopedia=Encyclopedia |work=work'},							-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 4 >------------------------
]]

function p:test_redundant_parameters_4()
    self:preprocess_equals_preprocess_many(
    	'{{citation/new |title=Title |', '}}', '{{citation |title=Title |', '}}',
		{
			{'encyclopedia=Encyclopedia |work=work'},							-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 5 >------------------------
]]

function p:test_redundant_parameters_5()
    self:preprocess_equals_preprocess_many(
    	'{{cite tech report/new |title=Title |', '}}', '{{cite tech report |title=Title |', '}}',
		{
			{'number=1 |id=ID'},												-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 6 >------------------------
]]

function p:test_redundant_parameters_6()
    self:preprocess_equals_preprocess_many(
    	'{{cite map/new |title=Title |', '}}', '{{cite map |title=Title |', '}}',
		{
			{'chapter=Chapter |map=Map'},										-- citation0()
			{'chapter=Chapter'},												-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ R E D U N D A N T _ P A R A M E T E R S _ 7 >------------------------
]]

function p:test_redundant_parameters_7()
    self:preprocess_equals_preprocess_many(
    	'{{cite episode/new |title=Title |series=Series |', '}}', '{{cite episode |title=Title |series=Series |', '}}',
		{
			{'season=Season |series-no=Series number'},							-- citation0()
			{'minutes=Minutes |time=Time'},										-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ P A R A M E T E R _ I G N O R E D _ S U G G E S T >------------------
]]

function p:test_parameter_ignored_suggest()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'Chapter=Chapter'},												-- citation() - case
			{'pulbisher=Pulbisher'},											-- citation() – misspelled pattern matched
			{'pub=Publisher'},													-- citation() – explicit match
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ P A R A M E T E R _ I G N O R E D >----------------------------------
]]

function p:test_parameter_ignored()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'unknown=unknown'},												-- citation()
			{'encyclopedia=Encyclopedia'},										-- citation0() – |encyclopedia= only available in {{cite encyclopdia}} and {{citation}}
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ P A R A M E T E R _ I G N O R E D _ 2 >------------------------------
]]

function p:test_parameter_ignored_2()
    self:preprocess_equals_preprocess_many(
    	'{{cite ssrn/new |title=Title |ssrn=123456 |', '}}', '{{cite ssrn |title=Title |ssrn=123456 |', '}}',
		{
			{'pulbisher=Pulbisher'},											-- citation() – misspelled pattern matched but suggested param not supported by this template
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ P A R A M E T E R _ I G N O R E D _ 3 >------------------------------
]]

function p:test_parameter_ignored_3()
    self:preprocess_equals_preprocess_many(
    	'{{cite newsgroup/new |title=Title |', '}}', '{{cite newsgroup |title=Title |', '}}',
		{
			{'newsgroup=sommat.sommat.sommat |publisher=Publisher'},					-- citation0() - |publisher= not supported by {{cite newsgroup}}
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ P A R A M _ H A S _ E X T _ L I N K >--------------------------------
]]

function p:test_param_has_ext_link()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |', '}}', '{{cite book |', '}}',
		{
			{'title=Title //example.com'},										-- check_for_url()
			{'title=Title http://example.com'},									-- check_for_url()
			{'title=[http://example.com Title]'},								-- check_for_url()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ P A R A M _ A C C E S S _ R E Q U I R E S _ P A R A M >--------------
]]

function p:test_param_access_requires_param()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'url-access=subscription'},										-- citation0()
			{'doi-access=free'},												-- extract_id_access_levels() (~/Identifiers)
			{'chapter-url-access=subscription'},								-- citation0()
--			{'map-url-access=subscription'},									-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ P A R A M _ A C C E S S _ R E Q U I R E S _ P A R A M _ 2 >----------
]]

function p:test_param_access_requires_param_2()
    self:preprocess_equals_preprocess_many(
    	'{{cite map/new |title=Title |', '}}', '{{cite map |title=Title |', '}}',
		{
			{'map-url-access=subscription'},									-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ M I S S I N G _ P I P E >--------------------------------------------
]]

function p:test_missing_pipe()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |url=//example.com |', '}}', '{{cite book |title=Title |url=//example.com |', '}}',
		{
			{'chapter=Chapter access-date=2020-06-10'},							-- missing_pipe_check()
			{'chapter=access-date=2020-06-10'},									-- missing_pipe_check()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ M I S S I N G _ P E R I O D I C A L >--------------------------------
]]

function p:test_missing_periodical()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title', '}}', '{{cite journal |title=Title', '}}',
		{
			{''},																-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ M I S S I N G _ P E R I O D I C A L _ 2 >----------------------------
]]

function p:test_missing_periodical_2()
    self:preprocess_equals_preprocess_many(
    	'{{cite magazine/new |title=Title', '}}', '{{cite magazine |title=Title', '}}',
		{
			{''},																-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ M I S S I N G _ N A M E >--------------------------------------------
]]

function p:test_missing_name()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'author=Black AB |author3=Red EF'},								-- extract_names()
		},
		{nowiki=false, templatestyles=true}
	)
end



--[[--------------------------< T E S T _ I N V I S I B L E _ C H A R >----------------------------------------
]]

function p:test_invisible_char()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |', '}}', '{{cite book |', '}}',
		{
			{'title=Title\239\191\189'},										-- replacement char - has_invisible_chars()
			{'title=Title\127UNIQ--spoof-000000-QINU\127'},						-- spoof a stripmarker so that comparison compares the same thing; <spoof></spoof> does not exist so not replaced with content
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ I N V A L I D _ P A R A M _ V A L >----------------------------------
]]

function p:test_invalid_param_val()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'mode=cs3'},														-- is_valid_parameter_value()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ F O R M A T _ M I S S I N G _ U R L >--------------------------------
]]

function p:test_format_missing_url()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'format=abc'},														-- style_format()
			{'archive-format=def'},
			{'chapter-format=ghi'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ F I R S T _ M I S S I N G _ L A S T >--------------------------------
]]

function p:test_first_missing_last()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'first=AB'},														-- extract_names()
			{'editor-first=AB'},
			{'given=AB'},
			{'editor-given=AB'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ E T A L >------------------------------------------------------------
]]

function p:test_etal()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'editor=Black AB; et al'},											-- name_has_etal()
			{'editor=Black AB, et al'},
			{'editor=Black AB et al'},
			{'editor=Black AB "et al"'},
			{'editor=Black AB \'et al\''},
			{'editor=Black AB et. al.'},
			{'editor=Black AB ET AL'},
			{'editor=Black AB EtAl'},
			{'editor=Black AB, \'\'et alia.\'\''},
			{'editor=Black AB; and others'},
			{'editor=Black AB; [[et al]]'},
			{'editor=Black AB; [et al]'},
			{'editor=Black AB; (et al)'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ E M P T Y _ C I T A T I O N >----------------------------------------
]]

function p:test_empty_citation()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new', '}}', '{{cite book', '}}',
		{
			{''},																-- citation()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ D O I B R O K E N _ M I S S I N G _ D O I >--------------------------
]]

function p:test_doibroken_missing_doi()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'doi-broken=June 2020'},																-- citation()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ D E P R E C A T E D _ P A R A M S >----------------------------------

this here for completeness; can't test deprecated param error messaging without actual deprecated parameters; at
this writing, 2020-06-10 there are no deprecated parameters

]]

function p:test_deprecated_params()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'editors'},																-- citation()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ C O N T R I B U T O R _ M I S S I N G _ R E Q U I R E D _ P A R A M >
]]

function p:test_contributor_missing_required_param()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |contributor=Contributor |', '}}', '{{cite book |title=Title |contributor=Contributor |', '}}',
		{
			{'contribution=Contribution'},										-- citation0()
			{'author=Author'},													-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ C O N T R I B U T O R _ I G N O R E D >------------------------------
]]

function p:test_contributor_ignored()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |contributor=Contributor |journal= Journal', '}}', '{{cite journal |title=Title |contributor=Contributor |journal= Journal', '}}',
		{
			{''},																-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ C L A S S _ I G N O R E D >------------------------------------------
]]

function p:test_class_ignored()
    self:preprocess_equals_preprocess_many(
    	'{{cite arxiv/new |title=Title |author=Author |', '}}', '{{cite arxiv |title=Title |author=Author |', '}}',
		{
			{'arxiv=abc.de/9901333 |class=abc'},								-- arxiv() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ C I T E S E E R X _ M I S S I N G >----------------------------------
]]

function p:test_citeseerx_missing()
    self:preprocess_equals_preprocess_many(
    	'{{cite citeseerx/new |', '}}', '{{cite citeseerx |', '}}',
		{
			{'title=Title '},																-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ C I T E _ W E B _ U R L >--------------------------------------------
]]

function p:test_cite_web_url()
    self:preprocess_equals_preprocess_many(
    	'{{cite web/new |', '}}', '{{cite web |', '}}',
		{
			{'title=Title'},													-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ C I T E _ W E B _ U R L _ 2 >----------------------------------------
]]

function p:test_cite_web_url_2()
    self:preprocess_equals_preprocess_many(
    	'{{citation/new |', '}}', '{{citation |', '}}',
		{
			{'title=Title |website=Website'},									-- citation0()
			{'title=Title |script-website=ja:Website'},							-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ C I T A T I O N _ M I S S I N G _ T I T L E >------------------------
]]

function p:test_citation_missing_title()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |', '}}', '{{cite book |', '}}',
		{
			{'author=Author'},													-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ C I T A T I O N _ M I S S I N G _ T I T L E _ 2 >--------------------
]]

function p:test_citation_missing_title_2()
    self:preprocess_equals_preprocess_many(
    	'{{cite episode/new |', '}}', '{{cite episode |', '}}',
		{
			{'author=Author'},													-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ C H A P T E R _ I G N O R E D >--------------------------------------
]]

function p:test_chapter_ignored()
    self:preprocess_equals_preprocess_many(
    	'{{cite news/new |title=Title |', '}}', '{{cite news |title=Title |', '}}',
		{
			{'chapter=Chapter'},												-- citation0()
			{'chapter-url=//example.com'},										-- citation0()
			{'trans-chapter=Trans-chapter'},									-- citation0()
			{'script-chapter=ja:Script-chapter'},								-- citation0()
			{'chapter-format=Chapter-format'},									-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B I O R X I V _ M I S S I N G >--------------------------------------
]]

function p:test_biorxiv_missing()
    self:preprocess_equals_preprocess_many(
    	'{{cite biorxiv/new |', '}}', '{{cite biorxiv |', '}}',
		{
			{'title=Title '},													-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A R E _ U R L _ M I S S I N G _ T I T L E >------------------------
]]

function p:test_bare_url_missing_title()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |', '}}', '{{cite book |', '}}',
		{
			{'title=Title |chapter-url=//example.com'},													-- citation0()
			{'title=Title |conference-url=//example.com'},													-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A R E _ U R L _ M I S S I N G _ T I T L E _ 2 >--------------------
]]

function p:test_bare_url_missing_title_2()
    self:preprocess_equals_preprocess_many(
    	'{{cite map/new |', '}}', '{{cite map |', '}}',
		{
			{'title=Title |map-url=//example.com'},													-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ Z B L >------------------------------------------------------
]]

function p:test_bad_zbl()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'zbl=ZBL'},														-- zbl() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ U S E N E T _ I D >------------------------------------------
]]

function p:test_bad_usenet_id()
    self:preprocess_equals_preprocess_many(
    	'{{cite newsgroup/new |title=Title |', '}}', '{{cite newsgroup |title=Title |', '}}',
		{
			{'message-id=message-id'},											-- usenet_id() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ U R L >------------------------------------------------------
]]

function p:test_bad_url()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'url=example.com'},												-- zbl() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ S S R N >----------------------------------------------------
]]

function p:test_bad_ssrn()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'ssrn=SSRN'},														-- ssrn() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ S B N >------------------------------------------------------
]]

function p:test_bad_sbn()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'sbn=123–456789'},													-- invalid character - sbn() (~/Identifiers)
			{'sbn=12345678'},													-- improper length
			{'sbn=123X45678'},													-- X in wrong spot
			{'sbn=012345678'},													-- incorrect check digit
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ S 2 C I D >--------------------------------------------------
]]

function p:test_bad_s2cid()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'s2cid=S2CID'},													-- s2cid() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ O C L C >----------------------------------------------------
]]

function p:test_bad_oclc()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'oclc=OCLC'},														-- oclc() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ P M I D >----------------------------------------------------
]]

function p:test_bad_pmid()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'pmid=PMID'},														-- pmid() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ P M C >------------------------------------------------------
]]

function p:test_bad_pmc()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'pmc=PMC'},														-- pmc() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ P A R A M _ L I N K >----------------------------------------
]]

function p:test_bad_paramlink()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |', '}}', '{{cite book |', '}}',
		{
			{'title=[[Title]] |title-link=Title'},								-- link_title_ok()
			{'title=Title |title-link=[[Title]]'},								-- link_title_ok()
			{'title=Title |title-link=//example.com'},							-- link_title_ok()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ O L >--------------------------------------------------------
]]

function p:test_bad_ol()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'ol=OL'},															-- ol() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ M R >--------------------------------------------------------
]]

function p:test_bad_mr()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'mr=MR'},															-- mr() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ L C C N >----------------------------------------------------
]]

function p:test_bad_lccn()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'lccn=LCCN'},														-- lccn() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ J F M >------------------------------------------------------
]]

function p:test_bad_jfm()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'jfm=JFM'},														-- jfm() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ I S S N >----------------------------------------------------
]]

function p:test_bad_issn()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'issn=ISSN'},														-- issn() (~/Identifiers)
			{'eissn=eISSN'},													-- issn() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ I S M N >----------------------------------------------------
]]

function p:test_bad_ismn()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'ismn=ISMN'},														-- ismn() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ I S B N >----------------------------------------------------
]]

function p:test_bad_isbn()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'isbn=0–1234567890'},												-- invalid character - ismn() (~/Identifiers)
			{'isbn=01234567890X'},												-- length
			{'isbn=01234X6789'},												-- X in the wrong spot
			{'isbn=978-01234X6789'},											-- isbn13 is digits only
			{'isbn=977-0123456789'},											-- 978 or 979 prefix only
			{'isbn=979-0123456789'},											-- 9790 is ismn
			{'isbn=978-0123456789'},											-- check digit
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ H D L >------------------------------------------------------
]]

function p:test_bad_hdl()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'hdl=HDL'},														-- hdl() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ D O I >------------------------------------------------------
]]

function p:test_bad_doi()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'doi=10.5555/12345678'},											-- invalid registrant - doi() (~/Identifiers)
			{'doi=10.2343/1234 5678'},											-- space char in suffix
			{'doi=11.2343/12345678'},											-- invalid prefix
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ D A T E >----------------------------------------------------
]]

function p:test_bad_date()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'date=DATE'},														-- citation0()
			{'date=2020 |year=2019'},											-- mismatch
			{'date=9201 |year=2019'},											-- mismatch with date error
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ C I T E S E E R X >------------------------------------------
]]

function p:test_bad_citeseerx()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'citeseerx=CITESEERX'},											-- citeseerx() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ B I O R X I V >----------------------------------------------
]]

function p:test_bad_biorxiv()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'biorxiv=BIORXIV'},												-- biorxiv() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ B I B C O D E >----------------------------------------------
]]

function p:test_bad_bibcode()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'bibcode=..................'},										-- length - bibcode() (~/Identifiers)
			{'bibcode=0999...............'},									-- value; missing letter after year
			{'bibcode=0999a..............'},									-- year < 1000
			{'bibcode=0999ab&............'},									-- journal abbrev must not have '&.'
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ A S I N >----------------------------------------------------
]]

function p:test_bad_asin()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'asin=ASIN'},														-- asin() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B A D _ A R X I V >--------------------------------------------------
]]

function p:test_bad_arxiv()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'arxiv=ARXIV'},													-- arxiv() (~/Identifiers)
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ A R X I V _ M I S S I N G >------------------------------------------
]]

function p:test_arxiv_missing()
    self:preprocess_equals_preprocess_many(
    	'{{cite arxiv/new |', '}}', '{{cite arxiv |', '}}',
		{
			{'author=Author |title=Title'},										-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ A R C H I V E _ U R L >----------------------------------------------
]]

function p:test_archive_url()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'archive-url=//web.archive.org/save/'},							-- save - archive_url_check()
			{'archive-url=//liveweb.archive.org/'},								-- obsolete liveweb url
			{'archive-url=//web.archive.org/2020'},								-- old form url short time stamp
			{'archive-url=//web.archive.org/web/2020'},							-- new form url short time stamp
			{'archive-url=//web.archive.org/20200611000000id_/'},				-- old form without path and with flag
			{'archive-url=//web.archive.org/path/20200611000000id_/'},			-- new form with malformed path and with flag
			{'archive-url=//web.archive.org/web/20200611000000_id/'},			-- new form with path and with malformed flag
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ A R C H I V E _ M I S S I N G _ U R L >------------------------------
]]

function p:test_archive_missing_url()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'archive-url=//archive.org |archive-date=2020-06-10 |url-status=live'},	-- live - citation0()
			{'archive-url=//archive.org |archive-date=2020-06-10'},				-- anything else
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ A P O S T R O P H E _ M A R K U P >----------------------------------
]]

function p:test_apostrophe_markup()
    self:preprocess_equals_preprocess_many(
    	'{{cite news/new |title=Title |', '}}', '{{cite news |title=Title |', '}}',
		{
			{'newspaper=\'\'Newspaper\'\''},									-- citation0()
			{'publisher=\'\'\'Newspaper\'\'\''},								-- citation0()
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ A C C E S S D A T E _ M I S S I N G _ U R L >------------------------
]]

function p:test_accessdate_missing_url()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |title=Title |journal=Journal |', '}}', '{{cite journal |title=Title |journal=Journal |', '}}',
		{
			{'access-date=2020-06-11'},											-- citation0()
			{'pmc=12345 |access-date=2020-06-11'},
		},
		{nowiki=false, templatestyles=true}
	)
end

--[[==========================<< M A I N T   C A T   M E S S A G E S >>========================================
]]
--[[--------------------------< T E S T _ A S I N _ U S E S _ I S B N >----------------------------------------
]]

function p:test_ASIN_uses_ISBN()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'asin=412346789X'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ A R C H I V E D _ C O P Y >------------------------------------------
]]

function p:test_Archived_copy()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}', '{{cite book |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}',
		{
			{'title=Archived copy'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ A U T H O R S >------------------------------------------------------
]]

function p:test_Authors()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'authors=Authors'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ B O T : U N K N O W N >----------------------------------------------
]]

function p:test_Bot_unknown()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}', '{{cite book |title=Title |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}',
		{
			{'url-status=bot: unknown'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ D A T E _ F O R M A T >----------------------------------------------
]]

function p:test_Date_format()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'date=Jun-Jul 2020'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ D A T E _ Y E A R >--------------------------------------------------
]]

function p:test_Date_year()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'date=2020 |year=2020'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ D I S P _ N A M E >--------------------------------------------------
]]

function p:test_Disp_name()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'author=Author |display-authors=1'},
			{'author=Author |contribution=Contribution |contributor=Contributor |display-contributors=1'},
			{'editor=Editor |display-editors=1'},
			{'interviewer=Interviewer |display-interviewers=1'},
			{'translator=Translator |display-translators=1'},
			{'author=Black AB |display-authors=etalia'},
			{'author=Black AB |display-authors=etal'},
			{'author=Black AB |author2=Red CD |display-authors=1'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ E M B A R G O >------------------------------------------------------
]]

function p:test_pmc_embargo_date()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'pmc=12345 |pmc-embargo-date=1 January 2020'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ E X T R A _ P U N C T >----------------------------------------------
]]

function p:test_Extra_punct()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'last=Surname,'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ E X T R A _ T E X T >------------------------------------------------
]]

function p:test_Extra_text()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'page=p. 35'},
			{'edition=1st ed.'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ E X T R A _ T E X T _ N A M E S >------------------------------------
]]

function p:test_Extra_text_names()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'author=Author (ed)'},
			{'author=Author |contribution=Contribution |contributor=Contributor (ed)'},
			{'editor=Editor (ed)'},
			{'interviewer=Interviewer (ed)'},
			{'translator=Translator (ed)'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ I G N O R E _ I S B N _ E R R >--------------------------------------
]]

function p:test_Ignore_isbn_err()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'isbn=978-0123456789 |ignore-isbn-error=yes'},						-- check digit
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ L O C A T I O N >----------------------------------------------------
]]

function p:test_Location()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'location=Sec. 6'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ M U L T _ N A M E S >------------------------------------------------
]]

function p:test_Mult_names()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'author=Name, Name, Name'},
			{'author=Author |contribution=Contribution |contributor=Name, Name, Name'},
			{'editor=Name, Name, Name'},
			{'interviewer=Name, Name, Name'},
			{'translator=Name, Name, Name'},{'author=Name; Name'},
			{'author=Author |contribution=Contribution |contributor=Name; Name'},
			{'editor=Name; Name'},
			{'interviewer=Name; Name'},
			{'translator=Name; Name'},
{'author=Name; Name, Name'},
{'author=Name; Name, Name, Name'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ N U M E R I C _ N A M E S >------------------------------------------
]]

function p:test_Numeric_names()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'author=1234'},
			{'author=Author |contribution=Contribution |contributor=1234'},
			{'editor=1234'},
			{'interviewer=1234'},
			{'translator=1234'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ O T H E R S >--------------------------------------------------------
]]

function p:test_Others()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'others=Name'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ P M C _ F O R M A T >------------------------------------------------
]]

function p:test_Pmc_format()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'pmc=PMC12345'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ R E F _ H A R V >----------------------------------------------------
]]

function p:test_Ref_harv()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'ref=harv'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ U N F I T >----------------------------------------------------------
]]

function p:test_Unfit()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}', '{{cite book |title=Title |url=//example.com |archive-url=//archive.org |archive-date=2020-07-29 |', '}}',
		{
			{'url-status=unfit'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ U N K N O W N _ L A N G >--------------------------------------------
]]

function p:test_Unknown_lang()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'language=Taglish'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ U N T I T L E D >----------------------------------------------------
]]

function p:test_Untitled()
    self:preprocess_equals_preprocess_many(
    	'{{cite journal/new |journal=Journal |', '}}', '{{cite journal |journal=Journal |', '}}',
		{
			{'title=none'},
		},
		{nowiki=false, templatestyles=true}
	)
end


--[[--------------------------< T E S T _ Z B L >--------------------------------------------------------------
]]

function p:test_Zbl()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
			{'zbl=07013361'},
		},
		{nowiki=false, templatestyles=true}
	)
end

return p