From bff63cbeb3309f296a886f7aa61265e3163f49a3 Mon Sep 17 00:00:00 2001 From: Galen Menzel Date: Thu, 10 Aug 2017 22:39:30 +0200 Subject: [PATCH] Fix false test failure * testing/lisp/test-org.el (test-org/deadline-close-p): Fix false failures due to time-zone differences. --- testing/lisp/test-org.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index e8512b93b..260d39127 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -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))