From 9f06f66c4d5970c4cf692956544456ab4458f3b1 Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Sat, 17 Dec 2016 12:38:26 -0800 Subject: [PATCH] Add tests for parse-iso8601-time-string. * parse-time-tests.el (parse-time-tests): Add tests for parse-iso8601-time-string. --- test/lisp/calendar/parse-time-tests.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/lisp/calendar/parse-time-tests.el b/test/lisp/calendar/parse-time-tests.el index 9bcf2b4a53c7..7a087d0f0bee 100644 --- a/test/lisp/calendar/parse-time-tests.el +++ b/test/lisp/calendar/parse-time-tests.el @@ -42,7 +42,19 @@ (should (equal (parse-time-string "Monday, 22 february 2016 19:35:42 +0100") '(42 35 19 22 2 2016 1 nil 3600))) (should (equal (parse-time-string "Monday, 22 february 2016 19:35:42 PDT") - '(42 35 19 22 2 2016 1 t -25200)))) + '(42 35 19 22 2 2016 1 t -25200))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54-0200") + '(13818 33666))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54-02:00") + '(13818 33666))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54-02") + '(13818 33666))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54+02") + '(13818 19266))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54Z") + '(13818 26466))) + (should (equal (parse-iso8601-time-string "1998-09-12T12:21:54") + '(13818 26466)))) (provide 'parse-time-tests) -- 2.1.4