--[=[ Unit tests for [[Module:Citation/CS1/Date validation]].
Click talk page to run tests.
]=]
local p = require('Module:UnitTests')----------------------------< Y M X _ D A T E S >------------------------------------------------------------
function p:test_ymx_dates -- EDTF dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< Y M D _ D A T E S >------------------------------------------------------------
function p:test_ymd_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< M D Y _ D A T E S >------------------------------------------------------------
function p:test_mdy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< M D D Y _ D A T E S >----------------------------------------------------------
function p:test_mddy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< D M Y _ D A T E S >------------------------------------------------------------
function p:test_dmy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< D D M Y _ D A T E S >----------------------------------------------------------
function p:test_ddmy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< M D M D Y _ D A T E S >--------------------------------------------------------
function p:test_mdmdy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< D M D M Y _ D A T E S >--------------------------------------------------------
function p:test_dmdmy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< M D Y M D Y _ D A T E S >------------------------------------------------------
function p:test_mdymdy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< D M Y D M Y _ D A T E S >------------------------------------------------------
function p:test_dmydmy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< M Y _ D A T E S >--------------------------------------------------------------
function p:test_my_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< S Y _ D A T E S >--------------------------------------------------------------
function p:test_sy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< Q Y _ D A T E S >--------------------------------------------------------------
function p:test_qy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< P R O P E R _ N A M E _ Y E A R _ D A T E S >----------------------------------
function p:test_proper_name_year_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< M M Y _ D A T E S >------------------------------------------------------------
function p:test_mmy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< S S Y _ D A T E S >------------------------------------------------------------
function p:test_ssy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< M Y M Y _ D A T E S >----------------------------------------------------------
function p:test_mymy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< S Y Y _ D A T E S >------------------------------------------------------------
function p:test_syy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< Y Y _ D A T E S >--------------------------------------------------------------
function p:test_yy_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< Y 4 Y 2 _ D A T E S >----------------------------------------------------------
function p:test_y4y2_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< Y _ D A T E S >----------------------------------------------------------------
function p:test_y_dates self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
----------------------------< Y E A R _ D A T E _ M I S M A T C H >------------------------------------------
function p:test_year_date_mismatch self:preprocess_equals_preprocess_many('Title . ', 'Book: Title . ', , )end
--
--
local function today_plus_offset_get (format, offset) return mw.getContentLanguage:formatDate(format, 'today ' .. offset and ('+ ' .. offset) or );end
----------------------------< A C C E S S - D A T E >--------------------------------------------------------
function p:test_access_dates self:preprocess_equals_preprocess_many(' Title . ', 'Book: Title . ', , )end
return p