]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
meta test: Assert that malformed dates are rejected
authorSimon McVittie <smcv@debian.org>
Wed, 21 Mar 2018 09:02:35 +0000 (09:02 +0000)
committerSimon McVittie <smcv@debian.org>
Wed, 21 Mar 2018 09:33:04 +0000 (09:33 +0000)
Signed-off-by: Simon McVittie <smcv@debian.org>
t/meta.t

index 429fb963e613609c2825c2f9c89cac95aacc7839..8602930bcfde2d3cf90bd7d603807288a2d0bc46 100755 (executable)
--- a/t/meta.t
+++ b/t/meta.t
@@ -161,4 +161,16 @@ write_build_read_compare(
        qr{<meta name="twitter:card" content="player" />},
 );
 
        qr{<meta name="twitter:card" content="player" />},
 );
 
+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();
 done_testing();