Module:Citation/CS1/testcases/identifiers
Appearance
--[=[
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