From: Simon McVittie Date: Wed, 21 Mar 2018 09:02:35 +0000 (+0000) Subject: meta test: Assert that malformed dates are rejected X-Git-Tag: 3.20190207~191 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/55cf1f9d9d223be56f43d5f6d94dfe67dc3bf072?ds=sidebyside meta test: Assert that malformed dates are rejected Signed-off-by: Simon McVittie --- diff --git a/t/meta.t b/t/meta.t index 429fb963e..8602930bc 100755 --- a/t/meta.t +++ b/t/meta.t @@ -161,4 +161,16 @@ write_build_read_compare( qr{}, ); +write_build_read_compare( + 'malformed_ISO-8601', + '[[!meta date="2018-02-281T12:00:00-0500"]]', + qr{Error: cannot parse date/time: 2018-02-281T12:00:00-0500}, +); + +write_build_read_compare( + 'nonsense_month', + '[[!meta date="2018-14-22T14:22:45-0500"]]', + qr{Error: cannot parse date/time: 2018-14-22T14:22:45-0500}, +); + done_testing();