From 434f98c152b106ae2485b1ca5724e7ae64ed58c1 Mon Sep 17 00:00:00 2001 From: Russ Tyndall Date: Wed, 29 Feb 2012 17:03:33 -0500 Subject: [PATCH] added test for with-formatter --- tests/collectors.lisp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/collectors.lisp b/tests/collectors.lisp index 578c712..28a2cff 100644 --- a/tests/collectors.lisp +++ b/tests/collectors.lisp @@ -91,6 +91,22 @@ (test) ))) +(define-test with-formatter + (with-formatter (test) + (test "~D ~D ~D" 0 0 0) + (test "~A" 1) + (test "~A" 2) + (test "~A" 3) + (test "ABC") + (assert-equal "0 0 0123ABC" (test))) + (with-formatter (test :delimiter "-") + (test "~D ~D ~D" 0 0 0) + (test "~A" 1) + (test "~A" 2) + (test "~A" 3) + (test "ABC") + (assert-equal "0 0 0-1-2-3-ABC" (test)))) + (define-test with-mapping-collector (with-mapping-collector (test (&rest nums) (apply #'+ nums))