From a8e4d713e7c9d6a3ad0b5d0e3244c685bbef2163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Cadilhac?= Date: Wed, 28 Aug 2019 18:15:40 -0500 Subject: [PATCH 2/3] Add test for the hidefiles parameter in clocktables. * testing/lisp/test-org-clock.el (test-org-clock/clocktable/hidefiles): Add test. --- testing/lisp/test-org-clock.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/testing/lisp/test-org-clock.el b/testing/lisp/test-org-clock.el index fa336f680..ad75a2ba5 100644 --- a/testing/lisp/test-org-clock.el +++ b/testing/lisp/test-org-clock.el @@ -1175,6 +1175,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 -- 2.22.0