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

(~@d): New tests.

This commit is contained in:
Kevin Ryde 2004-09-01 23:04:15 +00:00
parent 774613e927
commit 1e617094d0

View file

@ -38,6 +38,24 @@
(format #t "~&~&"))) (format #t "~&~&")))
"xyz\nabc\n"))) "xyz\nabc\n")))
;;;
;;; ~d
;;;
(with-test-prefix "~d decimal integer"
(with-test-prefix "~@d"
(pass-if "-1"
(string=? (format #f "~@d" -1) "-1"))
;; in guile 1.6.4 and earlier, ~@d gave "0" but we think "+0" is what the
;; common lisp spec intendes
(pass-if "+0"
(string=? (format #f "~@d" 0) "+0"))
(pass-if "+1"
(string=? (format #f "~@d" 1) "+1"))))
;;; ;;;
;;; ~{ ;;; ~{
;;; ;;;