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 <brucer42@gmail.com>
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53393
This commit is contained in:
Rudolf Adamkovič 2022-11-03 22:47:44 +01:00 committed by Ihor Radchenko
parent 9abf1b5167
commit eefb14f9fa
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 16 additions and 0 deletions

View File

@ -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:
<point>CLOCK: [2022-11-03 ??? 06:00]--[2022-11-03 ??? 06:01] => 0:01
:END:
"
(org-ctrl-c-ctrl-c)
(buffer-string)))))
;;; Clocktable