From 8839e982b2177bd740ef3a88f6a999a30fd62698 Mon Sep 17 00:00:00 2001 From: Galen Menzel Date: Tue, 8 Aug 2017 14:31:39 -0700 Subject: [PATCH] test-org.el: Fix two false test failures * testing/lisp/test-org.el (test-org/deadline-close-p): Fix false failures due to time-zone differences. (test-org/refile-get-targets): Fix false failures when test temp-file path contains a symlink. TINYCHANGE --- testing/lisp/test-org.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 372bf69c3..f2eda045f 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -375,7 +375,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)) @@ -5478,7 +5480,7 @@ Paragraph" ;; full file name. (should (org-test-with-temp-text-in-file "* H1" - (let* ((filename (buffer-file-name)) + (let* ((filename (file-truename (buffer-file-name))) (org-refile-use-outline-path 'full-file-path) (org-refile-targets `(((,filename) :level . 1)))) (member filename (mapcar #'car (org-refile-get-targets)))))) -- 2.14.0