summaryrefslogtreecommitdiff
path: root/test/lisp/calendar/iso8601-tests.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-07-08 17:22:01 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-07-08 17:22:01 +0200
commitc632332053caaf0f08ccb9bc26183a4bc7c3f2c2 (patch)
treebff5e6093d9caf4a97c2bde3335519ae240e5f97 /test/lisp/calendar/iso8601-tests.el
parenta74396af0e32bf5d2234cc21e5a83e74cd14f4af (diff)
downloademacs-c632332053caaf0f08ccb9bc26183a4bc7c3f2c2.tar.gz
Use decoded time math to be able to parse intervals
Diffstat (limited to 'test/lisp/calendar/iso8601-tests.el')
-rw-r--r--test/lisp/calendar/iso8601-tests.el14
1 files changed, 5 insertions, 9 deletions
diff --git a/test/lisp/calendar/iso8601-tests.el b/test/lisp/calendar/iso8601-tests.el
index b33f38f03fd..29f599bc338 100644
--- a/test/lisp/calendar/iso8601-tests.el
+++ b/test/lisp/calendar/iso8601-tests.el
@@ -98,16 +98,12 @@
(0 30 15 11 5 2008 nil nil 0)
;; Hm... can't really use decode-time for time differences...
(0 30 2 14 3 1971 0 nil 0))))
- (should
- (equal (iso8601-parse-interval "2007-03-01T13:00:00Z/P1Y2M10DT2H30M")
- '((0 0 13 1 3 2007 nil nil 0)
- ;; Well, that's wrong...
- (0 47 14 10 4 38 6 nil 0)
- (0 30 2 10 2 1 nil nil nil))))
+ (should (equal (iso8601-parse-interval "2007-03-01T13:00:00Z/P1Y2M10DT2H30M")
+ '((0 0 13 1 3 2007 nil nil 0)
+ (0 30 15 11 5 2008 nil nil 0)
+ (0 30 2 10 2 1 nil nil nil))))
(should (equal (iso8601-parse-interval "P1Y2M10DT2H30M/2008-05-11T15:30:00Z")
- ;; I think I have to add decoded-time math functions,
- ;; really.
- '((0 43 13 1 4 3977 5 nil 0)
+ '((0 0 13 1 3 2007 nil nil 0)
(0 30 15 11 5 2008 nil nil 0)
(0 30 2 10 2 1 nil nil nil)))))