[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org e08ce5b27d 09/12: test-org.el: Add some tests for `
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org e08ce5b27d 09/12: test-org.el: Add some tests for `org-test-with-timezone' |
Date: |
Sun, 17 Jul 2022 04:57:50 -0400 (EDT) |
branch: externals/org
commit e08ce5b27d2a3906025d1981d8cde9cc7332e32c
Author: Max Nikulin <manikulin@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
test-org.el: Add some tests for `org-test-with-timezone'
* testing/lisp/test-org.el (test-org/org-time-string-to-time):
Check that no daylight saving time value is forced for
`org-parse-time-string' and `org-encode-time' calls.
---
testing/lisp/test-org.el | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 10fcfc9978..2a2edc69e0 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -250,6 +250,26 @@
"%F %T"
(org-encode-time 8 30 23 31 3 2022))))))
+(ert-deftest test-org/org-time-string-to-time ()
+ "Test `org-time-string-to-time' around DST transition."
+ (org-test-with-timezone "UTC"
+ (should (string-equal
+ "2022-03-31 23:31:00"
+ (format-time-string
+ "%F %T"
+ (org-time-string-to-time "2022-03-31 23:31")))))
+ (org-test-with-timezone "Europe/Madrid"
+ (should (string-equal
+ "2022-03-24 23:32:00 +0100 CET"
+ (format-time-string
+ "%F %T %z %Z"
+ (org-time-string-to-time "2022-03-24 23:32"))))
+ (should (string-equal
+ "2022-03-31 23:33:00 +0200 CEST"
+ (format-time-string
+ "%F %T %z %Z"
+ (org-time-string-to-time "2022-03-31 23:33"))))))
+
(ert-deftest test-org/org-read-date ()
"Test `org-read-date' specifications."
;; Parse ISO date with abbreviated year and month.
- [elpa] externals/org updated (0583a0c5ea -> b4a72ddf98), ELPA Syncer, 2022/07/17
- [elpa] externals/org c550a42902 01/12: oc-basic: Parse @string entries in BiBTeX bibliographies, ELPA Syncer, 2022/07/17
- [elpa] externals/org a189697681 04/12: Fix tests for `org-parse-time-string' and `org-clock', ELPA Syncer, 2022/07/17
- [elpa] externals/org 132a9d304e 03/12: Use unknown DST instead of standard time in timestamps, ELPA Syncer, 2022/07/17
- [elpa] externals/org ae1db7df39 08/12: Use `org-encode-time' helper macro, ELPA Syncer, 2022/07/17
- [elpa] externals/org b4a72ddf98 12/12: org-agenda-show-current-time-in-grid: Use more common Unicode arrow, ELPA Syncer, 2022/07/17
- [elpa] externals/org bf930b6fe5 02/12: ; * lisp/org-refile.el (org-refile-targets): Fix typo., ELPA Syncer, 2022/07/17
- [elpa] externals/org e08ce5b27d 09/12: test-org.el: Add some tests for `org-test-with-timezone',
ELPA Syncer <=
- [elpa] externals/org f3802b017c 06/12: testing/lisp: Use `org-time-string-to-time', ELPA Syncer, 2022/07/17
- [elpa] externals/org a4105d0942 05/12: Use higher level helpers instead of `encode-time', ELPA Syncer, 2022/07/17
- [elpa] externals/org 064afa0c01 11/12: org-indent: Fix edge case when edited region ends at headline leading stars, ELPA Syncer, 2022/07/17
- [elpa] externals/org 79f0969ccc 10/12: * doc/org-manual.org (Using CDLaTeX to enter math): Clarify ' binding, ELPA Syncer, 2022/07/17
- [elpa] externals/org 8908a1bda1 07/12: org-macs.el: Introduce a helper for `encode-time', ELPA Syncer, 2022/07/17