diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-06-14 15:32:03 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-06-14 15:32:03 +0200 |
commit | 00f1a4be719cab4f1a3591ab3321ff34c86af86b (patch) | |
tree | 5d6a8a785b8d34fbac4ea919d7be89606289a4d6 /test | |
parent | 663fb3b774887d3d15a6791c3f35af56daa3c676 (diff) | |
download | emacs-00f1a4be719cab4f1a3591ab3321ff34c86af86b.tar.gz |
Get fractional seconds in iso8601 parsing right
* lisp/calendar/iso8601.el (iso8601-parse-time): Get fractional
times (with leading zeroes in the fraction part) right (bug#49017).
Fix based on a patch by "J.P." <jp@neverwas.me>.
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/calendar/iso8601-tests.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/lisp/calendar/iso8601-tests.el b/test/lisp/calendar/iso8601-tests.el index 618e5b12386..c4d038ab68c 100644 --- a/test/lisp/calendar/iso8601-tests.el +++ b/test/lisp/calendar/iso8601-tests.el @@ -183,7 +183,15 @@ (should (equal (iso8601-parse-time "15:27:35.123" t) '((35123 . 1000) 27 15 nil nil nil nil -1 nil))) (should (equal (iso8601-parse-time "15:27:35.123456789" t) - '((35123456789 . 1000000000) 27 15 nil nil nil nil -1 nil)))) + '((35123456789 . 1000000000) 27 15 nil nil nil nil -1 nil))) + (should (equal (iso8601-parse-time "15:27:35.012345678" t) + '((35012345678 . 1000000000) 27 15 nil nil nil nil -1 nil))) + (should (equal (iso8601-parse-time "15:27:35.00001" t) + '((3500001 . 100000) 27 15 nil nil nil nil -1 nil))) + (should (equal (iso8601-parse-time "15:27:35.0000100" t) + '((3500001 . 100000) 27 15 nil nil nil nil -1 nil))) + (should (equal (iso8601-parse-time "15:27:35.0" t) + '(35 27 15 nil nil nil nil -1 nil)))) (ert-deftest standard-test-time-of-day-beginning-of-day () (should (equal (iso8601-parse-time "000000") |