1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Add srfi-19 ~f regression test

* test-suite/tests/srfi-19.test ("SRFI date/time library"): Add test for
  https://bugs.gnu.org/26259.
This commit is contained in:
Andy Wingo 2017-04-19 15:49:06 +02:00
parent 4b39c1a9e5
commit e264860718

View file

@ -180,10 +180,14 @@ incomplete numerical tower implementation.)"
(equal? "099999999"
(date->string date "~N"))))
(pass-if "date->string correct ~f"
(pass-if "date->string ~f without leading zeroes"
(let ((date (make-date 200000000 5 34 12 26 3 2017 0)))
(equal? "5.2" (date->string date "~f"))))
(pass-if "date->string ~f proper fractional part"
(let ((date (make-date 550000 56 34 12 26 3 2017 0)))
(equal? "56.00055" (date->string date "~f"))))
;; check time comparison procedures
(let* ((time1 (make-time time-monotonic 0 0))
(time2 (make-time time-monotonic 0 0))