Jump to content

Module:Citation/CS1/testcases/identifiers

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Trappist the monk (talk | contribs) at 23:55, 6 September 2020 (Created page with '--[=[ Unit tests for Module:Citation/CS1/Identifiers. Click talk page to run tests. ]=] local p = require('Module:UnitTests') --[[----------------------...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

--[=[

Unit tests for [[Module:Citation/CS1/Identifiers]].

Click talk page to run tests.

]=]


local p = require('Module:UnitTests')
--[[--------------------------< A R X I V _ 9 1 0 7 _ 0 7 0 3 >------------------------------------------------
]]

function p:test_arxiv_9107_0703()
    self:preprocess_equals_preprocess_many(
    	'{{cite book/new |title=Title |', '}}', '{{cite book |title=Title |', '}}',
		{
																				-- legitimate date range
			{'arxiv=a.a/9106000'},												-- 9107-0703 format (fail)
			{'arxiv=a.a/9107000'},												-- 9107-0703 format (pass)
			{'arxiv=a.a/0703000'},												-- 9107-0703 format (pass)
			{'arxiv=a.a/0704000'},												-- 9107-0703 format (fail)
																				-- archive & class
			{'arxiv=.a/9107000'},												-- without archive (fail)
			{'arxiv=aa/9107000'},												-- without class (pass)
			
																				-- number
			{'arxiv=aa/910700'},												-- not enough digits (fail)
			{'arxiv=aa/91070000'},												-- too many digits (fail)

																				-- version
			{'arxiv=a.a/9107000v'},												-- missing version number (fail)
			{'arxiv=a.a/9107000v1'},											-- with version number (pass)
		},
		{nowiki=false, templatestyles=true}
	)
end


return p