summaryrefslogtreecommitdiff
path: root/test/lisp/calendar/iso8601-tests.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-01-30 02:11:09 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2020-01-30 02:11:15 +0100
commit7c7b91b9fe156b6af4643ca4aa8f4a5c4aeb915f (patch)
tree5b939400040405df08d6946620793b1a3a2237e9 /test/lisp/calendar/iso8601-tests.el
parent5db3324a7e11280437e69e27fe364dfd80b66ca2 (diff)
downloademacs-7c7b91b9fe156b6af4643ca4aa8f4a5c4aeb915f.tar.gz
Make iso8601.el understand two obsolete forms
* lisp/calendar/iso8601.el (iso8601-parse-date): Understand some obsolete formats to provide compatibility with the vCard RFC (bug#39347).
Diffstat (limited to 'test/lisp/calendar/iso8601-tests.el')
-rw-r--r--test/lisp/calendar/iso8601-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/calendar/iso8601-tests.el b/test/lisp/calendar/iso8601-tests.el
index 6e7a4724a6b..c2994ef8b4d 100644
--- a/test/lisp/calendar/iso8601-tests.el
+++ b/test/lisp/calendar/iso8601-tests.el
@@ -44,6 +44,14 @@
(should (equal (iso8601-parse-date "--0201")
'(nil nil nil 1 2 nil nil -1 nil))))
+(ert-deftest test-iso8601-date-obsolete-2000 ()
+ ;; These are forms in 5.2.1.3 of the 2000 version of the standard,
+ ;; e) and f).
+ (should (equal (iso8601-parse-date "--02")
+ '(nil nil nil nil 2 nil nil -1 nil)))
+ (should (equal (iso8601-parse-date "---12")
+ '(nil nil nil 12 nil nil nil -1 nil))))
+
(ert-deftest test-iso8601-date-weeks ()
(should (equal (iso8601-parse-date "2008W39-6")
'(nil nil nil 27 9 2008 nil -1 nil)))