aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/editfns-tests.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el
index 487f3aaa666..4a840c8d7d1 100644
--- a/test/src/editfns-tests.el
+++ b/test/src/editfns-tests.el
@@ -253,6 +253,16 @@
253 (format-time-string "%Y-%m-%d %H:%M:%S.%3N %z" nil 253 (format-time-string "%Y-%m-%d %H:%M:%S.%3N %z" nil
254 (concat (make-string 2048 ?X) "0"))))) 254 (concat (make-string 2048 ?X) "0")))))
255 255
256(defun editfns-tests--have-leap-seconds ()
257 (string-equal (format-time-string "%Y-%m-%d %H:%M:%S" 78796800 t)
258 "1972-06-30 23:59:60"))
259
260(ert-deftest format-time-string-with-bignum-on-32-bit ()
261 (should (or (string-equal
262 (format-time-string "%Y-%m-%d %H:%M:%S" (- (ash 1 31) 3600) t)
263 "2038-01-19 02:14:08")
264 (editfns-tests--have-leap-seconds))))
265
256(ert-deftest format-with-field () 266(ert-deftest format-with-field ()
257 (should (equal (format "First argument %2$s, then %3$s, then %1$s" 1 2 3) 267 (should (equal (format "First argument %2$s, then %3$s, then %1$s" 1 2 3)
258 "First argument 2, then 3, then 1")) 268 "First argument 2, then 3, then 1"))