1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 17:20:29 +02:00

New tests of excess arguments now ignored.

This commit is contained in:
Kevin Ryde 2004-09-01 23:39:45 +00:00
parent 7adcd11aeb
commit e2cc4b2f0c

View file

@ -38,6 +38,19 @@
(format #t "~&~&"))) (format #t "~&~&")))
"xyz\nabc\n"))) "xyz\nabc\n")))
;;;
;;; misc
;;;
(with-test-prefix "format"
;; in guile 1.6.4 and earlier, excess arguments were an error, but this
;; changed to follow the common lisp spec
(pass-if "excess arguments ignored A"
(string=? (format #f "" 1 2 3 4) ""))
(pass-if "excess arguments ignored B"
(string=? (format #f "~a ~a" 1 2 3 4) "1 2")))
;;; ;;;
;;; ~d ;;; ~d
;;; ;;;
@ -48,6 +61,7 @@
(pass-if "-1" (pass-if "-1"
(string=? (format #f "~@d" -1) "-1")) (string=? (format #f "~@d" -1) "-1"))
;; in guile 1.6.4 and earlier, ~@d gave "0" but we think "+0" is what the ;; in guile 1.6.4 and earlier, ~@d gave "0" but we think "+0" is what the
;; common lisp spec intendes ;; common lisp spec intendes
(pass-if "+0" (pass-if "+0"