diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-06-04 21:27:55 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-06-04 21:27:55 +0200 |
commit | daa11e13de4892ef08e08eb0fe2ceb812b6843e2 (patch) | |
tree | 9cea5bb872b41965e3435593108b58245452c6c7 | |
parent | 827413ef2f3ac2a790b4f5b89fd8dfe5eee95912 (diff) | |
download | org-mode-daa11e13de4892ef08e08eb0fe2ceb812b6843e2.tar.gz |
Fix a test
-rw-r--r-- | testing/lisp/test-org-colview.el | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/testing/lisp/test-org-colview.el b/testing/lisp/test-org-colview.el index 8207432..f81dfa1 100644 --- a/testing/lisp/test-org-colview.el +++ b/testing/lisp/test-org-colview.el @@ -415,10 +415,13 @@ ;; {@min}, {@max} and {@mean} apply to ages. (should (equal - (let ((org-columns--time (float-time (current-time)))) - (org-columns--summary-min-age (list "<2014-03-04 Tue>") nil)) - (org-test-with-temp-text - "* H + "0d 00h 0m 0s" + (cl-letf (((symbol-function 'current-time) + (lambda () + (apply #'encode-time + (org-parse-time-string "<2014-03-04 Tue>"))))) + (org-test-with-temp-text + "* H ** S1 :PROPERTIES: :A: <2012-03-29 Thu> @@ -427,14 +430,17 @@ :PROPERTIES: :A: <2014-03-04 Tue> :END:" - (let ((org-columns-default-format "%A{@min}")) (org-columns)) - (get-char-property (point) 'org-columns-value-modified)))) + (let ((org-columns-default-format "%A{@min}")) (org-columns)) + (get-char-property (point) 'org-columns-value-modified))))) (should (equal - (let ((org-columns--time (float-time (current-time)))) - (org-columns--summary-max-age (list "<2012-03-29 Thu>") nil)) - (org-test-with-temp-text - "* H + "705d 01h 0m 0s" + (cl-letf (((symbol-function 'current-time) + (lambda () + (apply #'encode-time + (org-parse-time-string "<2014-03-04 Tue>"))))) + (org-test-with-temp-text + "* H ** S1 :PROPERTIES: :A: <2012-03-29 Thu> @@ -443,15 +449,17 @@ :PROPERTIES: :A: <2014-03-04 Tue> :END:" - (let ((org-columns-default-format "%A{@max}")) (org-columns)) - (get-char-property (point) 'org-columns-value-modified)))) + (let ((org-columns-default-format "%A{@max}")) (org-columns)) + (get-char-property (point) 'org-columns-value-modified))))) (should (equal - (let ((org-columns--time (float-time (current-time)))) - (org-columns--summary-mean-age - (list "<2012-03-29 Thu>" "<2014-03-04 Tue>") nil)) - (org-test-with-temp-text - "* H + "352d 12h 30m 0s" + (cl-letf (((symbol-function 'current-time) + (lambda () + (apply #'encode-time + (org-parse-time-string "<2014-03-04 Tue>"))))) + (org-test-with-temp-text + "* H ** S1 :PROPERTIES: :A: <2012-03-29 Thu> @@ -460,8 +468,8 @@ :PROPERTIES: :A: <2014-03-04 Tue> :END:" - (let ((org-columns-default-format "%A{@mean}")) (org-columns)) - (get-char-property (point) 'org-columns-value-modified)))) + (let ((org-columns-default-format "%A{@mean}")) (org-columns)) + (get-char-property (point) 'org-columns-value-modified))))) ;; If a time value is expressed as a duration, return a duration. ;; If any of them follows H:MM:SS pattern, use it too. (should |