Trying to make test for `timeline-tools' independent of locale

This commit is contained in:
Daniel Borchmann 2020-01-05 14:28:31 +01:00
parent 243e579973
commit 4b7e02ccd6
Signed by: exot
GPG Key ID: 1C7071A75BB72D64

View File

@ -202,6 +202,7 @@ CLOCK: [2018-01-08 Mon 16:00]--[2018-01-08 Mon 16:15] => 0:15
(ert-deftest timeline-tools-test-clockline-no-conflict-1 () (ert-deftest timeline-tools-test-clockline-no-conflict-1 ()
"Test `timeline-tools-clockline-no-conflict with complex example." "Test `timeline-tools-clockline-no-conflict with complex example."
(let ((system-time-locale "C"))
(with-temp-buffer (with-temp-buffer
(insert " (insert "
* Task 1 * Task 1
@ -233,11 +234,12 @@ CLOCK: [2018-01-11 Thu 13:33]--[2018-01-12 Fri 14:00] => 24:27
* Task 2 * Task 2
:LOGBOOK: :LOGBOOK:
:END: :END:
")))) ")))))
(ert-deftest timeline-tools-test-add-clockline-to-marker-1 () (ert-deftest timeline-tools-test-add-clockline-to-marker-1 ()
"Test `timeline-tools-add-clockline-to-marker without running "Test `timeline-tools-add-clockline-to-marker without running
clock." clock."
(let ((system-time-locale "C"))
(with-temp-buffer (with-temp-buffer
(insert " (insert "
* Task 1 * Task 1
@ -272,11 +274,12 @@ CLOCK: [2018-01-11 Thu 13:33]--[2018-01-12 Fri 14:00] => 24:27
:LOGBOOK: :LOGBOOK:
CLOCK: [2018-01-07 Sun 13:00]--[2018-01-11 Thu 13:33] => 96:33 CLOCK: [2018-01-07 Sun 13:00]--[2018-01-11 Thu 13:33] => 96:33
:END: :END:
"))))) "))))))
(ert-deftest timeline-tools-test-add-clockline-to-marker-2 () (ert-deftest timeline-tools-test-add-clockline-to-marker-2 ()
"Test `timeline-tools-add-clockline-to-marker with running "Test `timeline-tools-add-clockline-to-marker with running
clock at same task." clock at same task."
(let ((system-time-locale "C"))
(with-temp-buffer (with-temp-buffer
(insert " (insert "
* Task 1 * Task 1
@ -319,11 +322,12 @@ CLOCK: [2018-01-11 Thu 13:33]--[2018-01-12 Fri 14:00] => 24:27
CLOCK: [2018-01-11 Thu 13:33] CLOCK: [2018-01-11 Thu 13:33]
CLOCK: [2018-01-07 Sun 13:00]--[2018-01-11 Thu 13:33] => 96:33 CLOCK: [2018-01-07 Sun 13:00]--[2018-01-11 Thu 13:33] => 96:33
:END: :END:
")))))) ")))))))
(ert-deftest timeline-tools-test-add-clockline-to-marker-3 () (ert-deftest timeline-tools-test-add-clockline-to-marker-3 ()
"Test `timeline-tools-add-clockline-to-marker with running "Test `timeline-tools-add-clockline-to-marker with running
clock at same task." clock at same task."
(let ((system-time-locale "C"))
(with-temp-buffer (with-temp-buffer
(insert " (insert "
* Task 1 * Task 1
@ -364,12 +368,13 @@ CLOCK: [2018-01-07 Sun 13:00]--[2018-01-11 Thu 13:33] => 96:33
:LOGBOOK: :LOGBOOK:
CLOCK: [2018-01-11 Thu 13:33] CLOCK: [2018-01-11 Thu 13:33]
:END: :END:
")))))) ")))))))
(ert-deftest timeline-tools-test-add-clockline-to-marker-4 () (ert-deftest timeline-tools-test-add-clockline-to-marker-4 ()
"Test `timeline-tools-add-clockline-to-marker with running "Test `timeline-tools-add-clockline-to-marker with running
clock at other task, and where afterwards only the running clock clock at other task, and where afterwards only the running clock
line is left." line is left."
(let ((system-time-locale "C"))
(with-temp-buffer (with-temp-buffer
(insert " (insert "
* Task 1 * Task 1
@ -412,6 +417,6 @@ CLOCK: [2018-01-11 Thu 13:33]--[2018-01-12 Fri 14:00] => 24:27
:LOGBOOK: :LOGBOOK:
CLOCK: [2018-01-11 Thu 13:33] CLOCK: [2018-01-11 Thu 13:33]
:END: :END:
")))))) ")))))))
;;; timeline-tools-test.el ends here ;;; timeline-tools-test.el ends here