diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-01-17 22:49:05 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-01-17 22:49:05 +0100 |
commit | fd1b3ad97268139a650724dd1deb25487d04e79c (patch) | |
tree | 7a5a07ab6a2ba96143e81668e3209fffb4c5490e | |
parent | ba6c0f1ea9d3430f23ed7e316b0f4a6c4a66c6fd (diff) | |
download | org-mode-fd1b3ad97268139a650724dd1deb25487d04e79c.tar.gz |
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>
-rw-r--r-- | testing/lisp/test-org.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 2e1d189..9a51c54 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -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." |