Module:Citation/CS1/testcases4

From blackwiki
< Module:Citation‎ | CS1
Revision as of 23:55, 6 September 2020 by blackwiki>Trappist the monk (Created page with '--[=[ Unit tests for Module:Citation/CS1/Identifiers. Click talk page to run tests. ]=] local p = require('Module:UnitTests') --[[----------------------...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

--[=[

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