0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

Fix false test failure

* testing/lisp/test-org.el (test-org/deadline-close-p): Fix false
failures due to time-zone differences.
This commit is contained in:
Galen Menzel 2017-08-10 22:39:30 +02:00 committed by Nicolas Goaziou
parent febab2fedb
commit bff63cbeb3

View file

@ -377,7 +377,9 @@
"Test `org-deadline-close-p' specifications."
;; Pretend that the current time is 2016-06-03 Fri 01:43
(cl-letf (((symbol-function 'current-time)
(lambda () '(22353 6425 905205 644000))))
(lambda ()
(apply #'encode-time
(org-parse-time-string "2016-06-03 Fri 01:43")))))
;; Timestamps are close if they are within `ndays' of lead time.
(org-test-with-temp-text "* Heading"
(should (org-deadline-close-p "2016-06-03 Fri" 0))