From 1e617094d05dc231ab95072ee61c89c51f67acb5 Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Wed, 1 Sep 2004 23:04:15 +0000 Subject: [PATCH] (~@d): New tests. --- test-suite/tests/format.test | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test-suite/tests/format.test b/test-suite/tests/format.test index 82252b55b..e55fce7ac 100644 --- a/test-suite/tests/format.test +++ b/test-suite/tests/format.test @@ -38,6 +38,24 @@ (format #t "~&~&"))) "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")))) + ;;; ;;; ~{ ;;;