diff options
| author | Stephen Gildea <stepheng+emacs@gildea.com> | 2019-10-27 08:20:13 -0700 |
|---|---|---|
| committer | Stephen Gildea <stepheng+emacs@gildea.com> | 2019-10-27 08:21:16 -0700 |
| commit | 113ff954dbcd24325bd674b7294d54a7c8394d42 (patch) | |
| tree | 2c62f2a9c64999fcd97d022db0fdf8e10c305fb9 /test/lisp | |
| parent | fc0f98a8a87ca48b4c3fb0e66d1bd1e2dcc9aa19 (diff) | |
| download | emacs-113ff954dbcd24325bd674b7294d54a7c8394d42.tar.gz | |
time-stamp-time-zone: update customization
* time-stamp.el (time-stamp-time-zone): Support customization with
an integer offset (a new possible value of the ZONE argument to
format-time-string in Emacs 27).
Update the safe-local-variable predicate from string-or-null-p
(describing time-stamp-time-zone's domain before 2015) to new
predicate time-stamp-zone-type-p (describing the current domain).
* time-stamp-tests.el (time-stamp-test-helper-zone-type-p): New test.
Diffstat (limited to 'test/lisp')
| -rw-r--r-- | test/lisp/time-stamp-tests.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/lisp/time-stamp-tests.el b/test/lisp/time-stamp-tests.el index 92df1839350..ad2cb0ead7f 100644 --- a/test/lisp/time-stamp-tests.el +++ b/test/lisp/time-stamp-tests.el @@ -57,6 +57,8 @@ ;;; Tests: +;;; Tests of time-stamp-string formatting + (ert-deftest time-stamp-test-format-day-of-week () "Test time-stamp formats for named day of week." (with-time-stamp-test-env @@ -360,4 +362,21 @@ (should (equal (time-stamp-string "%#3a" ref-time3) "SUN")) (should (equal (time-stamp-string "%#3b" ref-time2) "NOV")))) +;;; Tests of helper functions + +(ert-deftest time-stamp-test-helper-zone-type-p () + "Test time-stamp-zone-type-p." + (should (time-stamp-zone-type-p t)) + (should (time-stamp-zone-type-p nil)) + (should (time-stamp-zone-type-p 'wall)) + (should-not (time-stamp-zone-type-p 'floor)) + (should (time-stamp-zone-type-p "arbitrary string")) + (should (time-stamp-zone-type-p 0)) + (should-not (time-stamp-zone-type-p 3.14)) + (should-not (time-stamp-zone-type-p '(0))) + (should-not (time-stamp-zone-type-p '(0 . "A"))) + (should (time-stamp-zone-type-p '(0 "A"))) + (should-not (time-stamp-zone-type-p '(0 0))) + (should-not (time-stamp-zone-type-p '("A" "A")))) + ;;; time-stamp-tests.el ends here |
