aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorPaul Eggert2017-09-17 20:38:12 -0700
committerPaul Eggert2017-09-17 20:39:12 -0700
commit541006c53623cb5fb7dfae475baae5d64fc6e9d0 (patch)
treed3d14ad0815c1c220a90aea03e86db97b9bf23bf /test/src
parent679e05eeb97eae5a32fc67f4673b019c873ebcca (diff)
downloademacs-541006c53623cb5fb7dfae475baae5d64fc6e9d0.tar.gz
emacs-541006c53623cb5fb7dfae475baae5d64fc6e9d0.zip
Fix format-time-string %Z bug with negative tz
* src/editfns.c (tzlookup): Fix sign error in %Z when a purely numeric zone is negative (Bug#28746). * test/src/editfns-tests.el (format-time-string-with-zone): Add test for this bug.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/editfns-tests.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el
index 1c3fde888f6..f910afaf711 100644
--- a/test/src/editfns-tests.el
+++ b/test/src/editfns-tests.el
@@ -166,6 +166,10 @@
166 (should (string-equal 166 (should (string-equal
167 (format-time-string format look '(-28800 "PST")) 167 (format-time-string format look '(-28800 "PST"))
168 "1972-06-30 15:59:59.999 -0800 (PST)")) 168 "1972-06-30 15:59:59.999 -0800 (PST)"))
169 ;; Negative UTC offset, as a Lisp integer.
170 (should (string-equal
171 (format-time-string format look -28800)
172 "1972-06-30 15:59:59.999 -0800 (-08)"))
169 ;; Positive UTC offset that is not an hour multiple, as a string. 173 ;; Positive UTC offset that is not an hour multiple, as a string.
170 (should (string-equal 174 (should (string-equal
171 (format-time-string format look "IST-5:30") 175 (format-time-string format look "IST-5:30")