diff --git a/test-suite/tests/format.test b/test-suite/tests/format.test index e55fce7ac..f757fe33c 100644 --- a/test-suite/tests/format.test +++ b/test-suite/tests/format.test @@ -38,6 +38,19 @@ (format #t "~&~&"))) "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 ;;; @@ -48,6 +61,7 @@ (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"