summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaƫl Cadilhac <michael@cadilhac.name>2019-08-28 18:15:40 -0500
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-09-05 18:56:32 +0200
commit5cb360c7d002b5c5e9e621dd0b432e3a2baf3bfe (patch)
tree331a04df452f528881719d5c719912eab7a52fb3
parent9586db1248d9bba753af402acfa05d80358d45c5 (diff)
downloadorg-mode-5cb360c7d002b5c5e9e621dd0b432e3a2baf3bfe.tar.gz
Add test for the hidefiles parameter in clocktables.
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/hidefiles): Add test.
-rw-r--r--testing/lisp/test-org-clock.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/lisp/test-org-clock.el b/testing/lisp/test-org-clock.el
index 6432e17..53a2cff 100644
--- a/testing/lisp/test-org-clock.el
+++ b/testing/lisp/test-org-clock.el
@@ -1179,6 +1179,23 @@ CLOCK: [2017-10-02 Mon 11:00]--[2017-10-02 Mon 13:00] => 2:00"
(test-org-clock-clocktable-contents
":step week :block 2017-10 :stepskip0 t"))))))
+(ert-deftest test-org-clock/clocktable/hidefiles ()
+ "Test \":hidefiles\" parameter in Clock table."
+ ;; Test that hidefiles removes the file column.
+ (should
+ (equal
+ "| Headline | Time |
+|--------------+--------|
+| *Total time* | *1:00* |
+|--------------+--------|
+| Test | 1:00 |"
+ (org-test-with-temp-text-in-file
+ "* Test
+CLOCK: [2012-03-29 Thu 16:00]--[2012-03-29 Thu 17:00] => 1:00"
+ (let ((the-file (buffer-file-name)))
+ (org-test-with-temp-text-in-file ""
+ (test-org-clock-clocktable-contents
+ (format ":hidefiles t :scope (lambda () (list %S))" the-file))))))))
(provide 'test-org-clock)
;;; test-org-clock.el end here