1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-01 08:17:34 +00:00

Fix tests for org-parse-time-string' and org-clock'

* testing/lisp/test-org.el (ert-deftest test-org/org-parse-time-string):
Update test expectations to use DST of -1 (guess) after fix of
`org-parse-time-string'.
* testing/lisp/test-org-clock.el (org-test-clock-create-timestamp):
Do not change timezone from nil to 0.  Prevent test failures in zones
other than UTC.
This commit is contained in:
Max Nikulin 2022-05-03 17:59:11 +07:00 committed by Ihor Radchenko
parent 132a9d304e
commit a189697681
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
2 changed files with 8 additions and 8 deletions

View File

@ -27,9 +27,9 @@ Return the timestamp as a string."
(org-element-interpret-data
(let ((time (decode-time
(apply #'encode-time
(mapcar (lambda (el) (or el 0))
(org-read-date-analyze
input nil (decode-time (current-time))))))))
(org-fix-decoded-time
(org-read-date-analyze
input nil (decode-time (current-time))))))))
(list 'timestamp
(list :type (if inactive 'inactive 'active)
:minute-start (and with-time (nth 1 time))

View File

@ -268,15 +268,15 @@
(ert-deftest test-org/org-parse-time-string ()
"Test `org-parse-time-string'."
(should (equal (org-parse-time-string "2012-03-29 16:40")
'(0 40 16 29 3 2012 nil nil nil)))
'(0 40 16 29 3 2012 nil -1 nil)))
(should (equal (org-parse-time-string "[2012-03-29 16:40]")
'(0 40 16 29 3 2012 nil nil nil)))
'(0 40 16 29 3 2012 nil -1 nil)))
(should (equal (org-parse-time-string "<2012-03-29 16:40>")
'(0 40 16 29 3 2012 nil nil nil)))
'(0 40 16 29 3 2012 nil -1 nil)))
(should (equal (org-parse-time-string "<2012-03-29>")
'(0 0 0 29 3 2012 nil nil nil)))
'(0 0 0 29 3 2012 nil -1 nil)))
(should (equal (org-parse-time-string "<2012-03-29>" t)
'(0 nil nil 29 3 2012 nil nil nil))))
'(0 nil nil 29 3 2012 nil -1 nil))))
(ert-deftest test-org/closest-date ()
"Test `org-closest-date' specifications."