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:
parent
774613e927
commit
1e617094d0
1 changed files with 18 additions and 0 deletions
|
@ -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"))))
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; ~{
|
;;; ~{
|
||||||
;;;
|
;;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue