From e39e3fa3e58963e7ef15258ed267fa9ed0de936b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= Date: Thu, 3 Nov 2022 22:47:44 +0100 Subject: [PATCH] test-org-clock: Test DWIM update of days * testing/listp/test-org-clock (test-org-clock/clock-drawer-dwim): Add new test for DWIM updates of days for clocks in logbook drawers. Reported-by: Bruce E. Robertson Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53393 --- testing/lisp/test-org-clock.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/testing/lisp/test-org-clock.el b/testing/lisp/test-org-clock.el index f992c8d7a..68286b174 100644 --- a/testing/lisp/test-org-clock.el +++ b/testing/lisp/test-org-clock.el @@ -273,6 +273,22 @@ the buffer." (org-log-into-drawer nil)) (org-clock-drawer-name)))))) +(ert-deftest test-org-clock/clock-drawer-dwim () + "Test DWIM update of days for clocks in logbook drawers." + (should (equal "* Foo +:LOGBOOK: +CLOCK: [2022-11-03 Thu 06:00]--[2022-11-03 Thu 06:01] => 0:01 +:END: +" + (org-test-with-temp-text + "* Foo +:LOGBOOK: +CLOCK: [2022-11-03 ??? 06:00]--[2022-11-03 ??? 06:01] => 0:01 +:END: +" + (org-ctrl-c-ctrl-c) + (buffer-string))))) + ;;; Clocktable -- 2.38.1