diff options
| author | Paul Eggert | 2019-10-10 00:15:24 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-10-10 00:16:21 -0700 |
| commit | 288e00d69ac8d9907e8d6b8cccff2b3c914b2464 (patch) | |
| tree | 3a1a56395a483f8fb5080f2d0773a736f0a7cfdd | |
| parent | b3314ac5c43414a5de518794d002aa3801ed809f (diff) | |
| download | emacs-288e00d69ac8d9907e8d6b8cccff2b3c914b2464.tar.gz emacs-288e00d69ac8d9907e8d6b8cccff2b3c914b2464.zip | |
Port time-stamp-test-time-zone to macOS
Problem reported by Stefan Kangas in:
https://lists.gnu.org/r/emacs-devel/2019-10/msg00360.html
* test/lisp/time-stamp-tests.el (time-stamp-test-time-zone):
Don’t assume (format-time-string "%Z" 0 t) returns "GMT".
| -rw-r--r-- | test/lisp/time-stamp-tests.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/lisp/time-stamp-tests.el b/test/lisp/time-stamp-tests.el index ace5e58e367..37822f6e290 100644 --- a/test/lisp/time-stamp-tests.el +++ b/test/lisp/time-stamp-tests.el | |||
| @@ -298,12 +298,14 @@ | |||
| 298 | (ert-deftest time-stamp-test-time-zone () | 298 | (ert-deftest time-stamp-test-time-zone () |
| 299 | "Test time-stamp formats for time zone." | 299 | "Test time-stamp formats for time zone." |
| 300 | (with-time-stamp-test-env | 300 | (with-time-stamp-test-env |
| 301 | ;; implemented and documented since 1995 | 301 | (let ((UTC-abbr (format-time-string "%Z" ref-time t)) |
| 302 | (should (equal (time-stamp-string "%Z" ref-time) "GMT")) | 302 | (utc-abbr (format-time-string "%#Z" ref-time t))) |
| 303 | ;; documented 1995-2019 | 303 | ;; implemented and documented since 1995 |
| 304 | (should (equal (time-stamp-string "%z" ref-time) "gmt")) | 304 | (should (equal (time-stamp-string "%Z" ref-time) UTC-abbr)) |
| 305 | ;; implemented since 1997, documented since 2019 | 305 | ;; documented 1995-2019 |
| 306 | (should (equal (time-stamp-string "%#Z" ref-time) "gmt")))) | 306 | (should (equal (time-stamp-string "%z" ref-time) utc-abbr)) |
| 307 | ;; implemented since 1997, documented since 2019 | ||
| 308 | (should (equal (time-stamp-string "%#Z" ref-time) utc-abbr))))) | ||
| 307 | 309 | ||
| 308 | (ert-deftest time-stamp-test-non-date-conversions () | 310 | (ert-deftest time-stamp-test-non-date-conversions () |
| 309 | "Test time-stamp formats for non-date items." | 311 | "Test time-stamp formats for non-date items." |