diff options
| author | Eli Zaretskii | 2018-10-20 12:52:52 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-10-20 12:52:52 +0300 |
| commit | efb214622a0f4e077c09e721d134552dfe76ef70 (patch) | |
| tree | cd2394d5da30aded30a73c22b44b6e9512da96c2 /test | |
| parent | d684f5d5bc33249038e779a4b2009fd0761f09d5 (diff) | |
| download | emacs-efb214622a0f4e077c09e721d134552dfe76ef70.tar.gz emacs-efb214622a0f4e077c09e721d134552dfe76ef70.zip | |
Fix 'timer-next-integral-multiple-of-time'
* lisp/emacs-lisp/timer.el
(timer-next-integral-multiple-of-time): Fix recent change for
fractional values of SECS. (Bug#33071)
* test/lisp/emacs-lisp/timer-tests.el
(timer-next-integral-multiple-of-time-2): New test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emacs-lisp/timer-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/timer-tests.el b/test/lisp/emacs-lisp/timer-tests.el index c5971ee7687..7a5b9263b0b 100644 --- a/test/lisp/emacs-lisp/timer-tests.el +++ b/test/lisp/emacs-lisp/timer-tests.el | |||
| @@ -44,4 +44,12 @@ | |||
| 44 | (timer-next-integral-multiple-of-time '(0 0 0 1) (1+ (ash 1 53))) | 44 | (timer-next-integral-multiple-of-time '(0 0 0 1) (1+ (ash 1 53))) |
| 45 | (list (ash 1 (- 53 16)) 1)))) | 45 | (list (ash 1 (- 53 16)) 1)))) |
| 46 | 46 | ||
| 47 | (ert-deftest timer-next-integral-multiple-of-time-2 () | ||
| 48 | "Test bug#33071." | ||
| 49 | (let* ((tc (current-time)) | ||
| 50 | (tce (encode-time tc 100)) | ||
| 51 | (nt (timer-next-integral-multiple-of-time tc 0.01)) | ||
| 52 | (nte (encode-time nt 100))) | ||
| 53 | (should (= (car nte) (1+ (car tce)))))) | ||
| 54 | |||
| 47 | ;;; timer-tests.el ends here | 55 | ;;; timer-tests.el ends here |