summaryrefslogtreecommitdiff
path: root/test/lisp/calendar/iso8601-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/calendar/iso8601-tests.el')
-rw-r--r--test/lisp/calendar/iso8601-tests.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/lisp/calendar/iso8601-tests.el b/test/lisp/calendar/iso8601-tests.el
index a8f00e74790..f9ea6e886b1 100644
--- a/test/lisp/calendar/iso8601-tests.el
+++ b/test/lisp/calendar/iso8601-tests.el
@@ -84,4 +84,11 @@
(should (equal (iso8601-parse-duration "P0003-06-04T12:30:05")
'(5 30 12 4 6 3 nil nil nil))))
+(ert-deftest test-iso8601-invalid ()
+ (should-not (iso8601-valid-p " 2008-03-02T13:47:30-01"))
+ (should-not (iso8601-valid-p "2008-03-02T13:47:30-01:200"))
+ (should-not (iso8601-valid-p "2008-03-02T13:47:30-01 "))
+ (should-not (iso8601-valid-p "2008-03-02 T 13:47:30-01 "))
+ (should-not (iso8601-valid-p "20008-03-02T13:47:30-01")))
+
;;; iso8601-tests.el ends here