Fix failing test

* testing/lisp/test-org.el (test-org/timestamp-from-time): Do not
  hardcode internal time.

Reported-by: Tim Landscheidt <tim@tim-landscheidt.de>
<http://lists.gnu.org/r/emacs-orgmode/2018-01/msg00297.html>
This commit is contained in:
Nicolas Goaziou 2018-01-17 22:49:05 +01:00
parent ba6c0f1ea9
commit fd1b3ad972
1 changed files with 11 additions and 3 deletions

View File

@ -6494,21 +6494,29 @@ CLOCK: [2012-03-29 Thu 10:00]--[2012-03-29 Thu 16:40] => 6:40"
(equal "<2012-03-29 Thu>"
(let ((system-time-locale "en_US"))
(org-element-interpret-data
(org-timestamp-from-time '(20339 35296))))))
(org-timestamp-from-time
(apply #'encode-time
(org-parse-time-string "<2012-03-29 Thu 16:40>")))))))
;; When optional argument WITH-TIME is non-nil, provide time
;; information.
(should
(equal "<2012-03-29 Thu 16:40>"
(let ((system-time-locale "en_US"))
(org-element-interpret-data
(org-timestamp-from-time '(20340 29760) t)))))
(org-timestamp-from-time
(apply #'encode-time
(org-parse-time-string "<2012-03-29 Thu 16:40>"))
t)))))
;; When optional argument INACTIVE is non-nil, return an inactive
;; timestamp.
(should
(equal "[2012-03-29 Thu]"
(let ((system-time-locale "en_US"))
(org-element-interpret-data
(org-timestamp-from-time '(20339 35296) nil t))))))
(org-timestamp-from-time
(apply #'encode-time
(org-parse-time-string "<2012-03-29 Thu 16:40>"))
nil t))))))
(ert-deftest test-org/timestamp-to-time ()
"Test `org-timestamp-to-time' specifications."