Test output for fmt

Testing time: 9.0s

CHICKEN_INSTALL_PREFIX=/root/src/salmonella/salmonella-4.5.0/repo CHICKEN_INCLUDE_PATH=/root/src/salmonella/salmonella-4.5.0/repo/share/chicken CHICKEN_REPOSITORY=/root/src/salmonella/salmonella-4.5.0/repo/lib/chicken/5 /usr/local/chicken-4.5.0/bin/csi -script run.scm

-- testing fmt ---------------------------------------------------------------
(fmt #f "hi") ........................................................ [ PASS]
(fmt #f (wrt "hi")) .................................................. [ PASS]
(fmt #f (wrt "hi \"bob\"")) .......................................... [ PASS]
(fmt #f (wrt "hello\nworld")) ........................................ [ PASS]
(fmt #f (upcase "abc")) .............................................. [ PASS]
(fmt #f (downcase "ABC")) ............................................ [ PASS]
(fmt #f (titlecase "abc")) ........................................... [ PASS]
(fmt #f "abc" (tab-to) "def") ........................................ [ PASS]
(fmt #f "abc" (tab-to 5) "def") ...................................... [ PASS]
(fmt #f "abc" (tab-to 3) "def") ...................................... [ PASS]
(fmt #f -1) .......................................................... [ PASS]
(fmt #f 0) ........................................................... [ PASS]
(fmt #f 1) ........................................................... [ PASS]
(fmt #f 10) .......................................................... [ PASS]
(fmt #f 100) ......................................................... [ PASS]
(fmt #f (num -1)) .................................................... [ PASS]
(fmt #f (num 0)) ..................................................... [ PASS]
(fmt #f (num 1)) ..................................................... [ PASS]
(fmt #f (num 10)) .................................................... [ PASS]
(fmt #f (num 100)) ................................................... [ PASS]
(fmt #f 57005) ....................................................... [ PASS]
(fmt #f (radix 16 57005)) ............................................ [ PASS]
(fmt #f (radix 16 57005) 1234) ....................................... [ PASS]
(fmt #f (radix 16 (exact->inexact (/ 57005 256)))) ................... [ PASS]
(fmt #f (radix 16 (exact->inexact (/ 57005 4096)))) .................. [ PASS]
(fmt #f (radix 16 (exact->inexact (/ 57005 65536)))) ................. [ PASS]
(fmt #f (radix 17 (num 33))) ......................................... [ PASS]
(fmt #f (num 33 17)) ................................................. [ PASS]
(fmt #f 3.14159) ..................................................... [ PASS]
(fmt #f (fix 2 3.14159)) ............................................. [ PASS]
(fmt #f (fix 2 3.14)) ................................................ [ PASS]
(fmt #f (fix 2 3.0)) ................................................. [ PASS]
(fmt #f (num 1.099 10 2)) ............................................ [ PASS]
(fmt #f (fix 2 1e-17)) ............................................... [ PASS]
(fmt #f (fix 10 1e-17)) .............................................. [ PASS]
(fmt #f (fix 20 1e-17)) .............................................. [ PASS]
(fmt #f (num 4e-06 10 6)) ............................................ [ PASS]
(fmt #f (num 4e-06 10 7)) ............................................ [ PASS]
(fmt #f (num 4e-06 10 8)) ............................................ [ PASS]
(fmt #f (decimal-align 5 (num 3.14159))) ............................. [ PASS]
(fmt #f (decimal-align 5 (num 31.4159))) ............................. [ PASS]
(fmt #f (decimal-align 5 (num 314.159))) ............................. [ PASS]
(fmt #f (decimal-align 5 (num 3141.59))) ............................. [ PASS]
(fmt #f (decimal-align 5 (num 31415.9))) ............................. [ PASS]
(fmt #f (decimal-align 5 (num -3.14159))) ............................ [ PASS]
(fmt #f (decimal-align 5 (num -31.4159))) ............................ [ PASS]
(fmt #f (decimal-align 5 (num -314.159))) ............................ [ PASS]
(fmt #f (decimal-align 5 (num -3141.59))) ............................ [ PASS]
(fmt #f (decimal-align 5 (num -31415.9))) ............................ 
Warning: (line 89) cannot represent exact fraction - coerced to flonum: "1000/3"

Warning: (line 90) cannot represent exact fraction - coerced to flonum: "100/3"

Warning: (line 91) cannot represent exact fraction - coerced to flonum: "10/3"

Warning: (line 92) cannot represent exact fraction - coerced to flonum: "1/3"

Warning: (line 93) cannot represent exact fraction - coerced to flonum: "1/30"

Warning: (line 94) cannot represent exact fraction - coerced to flonum: "1/300"

Warning: (line 95) cannot represent exact fraction - coerced to flonum: "1/3000"

Warning: (line 96) cannot represent exact fraction - coerced to flonum: "2/3"

Warning: (line 97) cannot represent exact fraction - coerced to flonum: "1/11"

Warning: (line 98) cannot represent exact fraction - coerced to flonum: "10/7"

Warning: (line 102) cannot represent exact fraction - coerced to flonum: "1000/3"

Warning: (line 103) cannot represent exact fraction - coerced to flonum: "100/3"

Warning: (line 104) cannot represent exact fraction - coerced to flonum: "10/3"

Warning: (line 105) cannot represent exact fraction - coerced to flonum: "1/3"
[ PASS]
(fmt #f (num (/ 47 4) 10 2)) ......................................... [ PASS]
(fmt #f (num (/ -47 4) 10 2)) ........................................ [ PASS]
(fmt #f (radix 16 '(17 34 51))) ...................................... [ PASS]
(fmt #f (num 299792458 10 #f #f #t)) ................................. [ PASS]
(fmt #f (num/comma 299792458)) ....................................... [ PASS]
(fmt #f (comma-char #\. (num/comma 299792458))) ...................... [ PASS]
(fmt #f (comma-char #\. (num/comma 299792458.0))) .................... [ PASS]
(fmt #f (num 100000 10 0 #f 3)) ...................................... [ PASS]
(fmt #f (num 100000 10 1 #f 3)) ...................................... [ PASS]
(fmt #f (num 100000 10 2 #f 3)) ...................................... [ PASS]
(fmt #f (fix 2 (num/fit 4 1.2345))) .................................. [ PASS]
(fmt #f (fix 2 (num/fit 4 1))) ....................................... [ PASS]
(fmt #f (fix 2 (num/fit 4 12.345))) .................................. [ PASS]
(fmt #f (num/si 3986)) ............................................... [ PASS]
(fmt #f (num/si 3986 1000)) .......................................... [ PASS]
(fmt #f (num/si 608)) ................................................ [ PASS]
(fmt #f (num/si 12345.12355 16)) ..................................... [ PASS]
(fmt #f (pad 5 "abc")) ............................................... [ PASS]
(fmt #f (pad/left 5 "abc")) .......................................... [ PASS]
(fmt #f (pad/both 5 "abc")) .......................................... [ PASS]
(fmt #f (pad 5 "abcde")) ............................................. [ PASS]
(fmt #f (pad 5 "abcdef")) ............................................ [ PASS]
(fmt #f (trim 3 "abcde")) ............................................ [ PASS]
(fmt #f (trim/length 3 "abcde")) ..................................... [ PASS]
(fmt #f (trim/length 3 "abc\nde")) ................................... [ PASS]
(fmt #f (trim/left 3 "abcde")) ....................................... [ PASS]
(fmt #f (trim/both 3 "abcde")) ....................................... [ PASS]
(fmt #f "prefix: " (trim 3 "abcde")) ................................. [ PASS]
(fmt #f "prefix: " (trim/length 3 "abcde")) .......................... [ PASS]
(fmt #f "prefix: " (trim/length 3 "abc\nde")) ........................ [ PASS]
(fmt #f "prefix: " (trim/left 3 "abcde")) ............................ [ PASS]
(fmt #f "prefix: " (trim/both 3 "abcde")) ............................ [ PASS]
(fmt #f (ellipses "..." (trim 5 "abcde"))) ........................... [ PASS]
(fmt #f (ellipses "..." (trim 5 "abcdef"))) .......................... [ PASS]
(fmt #f (ellipses "..." (trim 6 "abcdefg"))) ......................... [ PASS]
(fmt #f (ellipses "..." (trim/left 5 "abcde"))) ...................... [ PASS]
(fmt #f (ellipses "..." (trim/left 5 "abcdef"))) ..................... [ PASS]
(fmt #f (ellipses "..." (trim/left 6 "abcdefg"))) .................... [ PASS]
(fmt #f (ellipses "..." (trim/both 7 "abcdefg"))) .................... [ PASS]
(fmt #f (ellipses "..." (trim/both 7 "abcdefgh"))) ................... [ PASS]
(fmt #f (ellipses "..." (trim/both 7 "abcdefghi"))) .................. [ PASS]
(fmt #f (fit 5 "abc")) ............................................... [ PASS]
(fmt #f (fit/left 5 "abc")) .......................................... [ PASS]
(fmt #f (fit/both 5 "abc")) .......................................... [ PASS]
(fmt #f (fit 5 "abcde")) ............................................. [ PASS]
(fmt #f (fit/left 5 "abcde")) ........................................ [ PASS]
(fmt #f (fit/both 5 "abcde")) ........................................ [ PASS]
(fmt #f (fit 5 "abcdefgh")) .......................................... [ PASS]
(fmt #f (fit/left 5 "abcdefgh")) ..................................... [ PASS]
(fmt #f (fit/both 5 "abcdefgh")) ..................................... [ PASS]
(fmt #f "prefix: " (fit 5 "abc")) .................................... [ PASS]
(fmt #f "prefix: " (fit/left 5 "abc")) ............................... [ PASS]
(fmt #f "prefix: " (fit/both 5 "abc")) ............................... [ PASS]
(fmt #f "prefix: " (fit 5 "abcde")) .................................. [ PASS]
(fmt #f "prefix: " (fit/left 5 "abcde")) ............................. [ PASS]
(fmt #f "prefix: " (fit/both 5 "abcde")) ............................. [ PASS]
(fmt #f "prefix: " (fit 5 "abcdefgh")) ............................... [ PASS]
(fmt #f "prefix: " (fit/left 5 "abcdefgh")) .......................... [ PASS]
(fmt #f "prefix: " (fit/both 5 "abcdefgh")) .......................... [ PASS]
(fmt #f (fmt-join/suffix (cut trim 3 <>) (string-split "abcdef\... ... [ PASS]
(fmt #f (fmt-join dsp '(1 2 3) " ")) ................................. [ PASS]
(fmt #f (wrt (let ((ones (list 1))) (set-cdr! ones ones) ones))) ..... [ PASS]
(fmt #f (wrt (let ((ones (list 1))) (set-cdr! ones ones) (cons ... ... [ PASS]
(fmt #f (wrt (let ((syms (list 'sym))) (set-cdr! syms syms) (co... ... [ PASS]
(fmt #f (wrt (let ((ones (list 1)) (twos (list 2))) (set-cdr! o... ... [ PASS]
(fmt #f (trim/length 10 (wrt/unshared (let ((ones (list 1))) (s... ... [ PASS]
(fmt #f (trim/length 11 (wrt/unshared (let ((ones (list 1))) (s... ... [ PASS]
(fmt#fmt #f (fmt#pretty sexp)) ....................................... [ PASS]
(fmt#fmt #f (fmt#pretty sexp)) ....................................... [ PASS]
(fmt#fmt #f (fmt#pretty sexp)) ....................................... [ PASS]
(fmt#fmt #f (fmt#pretty sexp)) ....................................... [ PASS]
(fmt#fmt #f (fmt#pretty sexp)) ....................................... [ PASS]
(fmt#fmt #f (fmt#pretty sexp)) ....................................... [ PASS]
(fmt#fmt #f (fmt#pretty sexp)) ....................................... [ PASS]
(fmt#fmt #f (fmt#pretty sexp)) ....................................... [ PASS]
(fmt#fmt #f (fmt#pretty sexp)) ....................................... [ PASS]
(fmt#fmt #f (fmt#pretty sexp)) ....................................... [ PASS]
(fmt#fmt #f (fmt#pretty sexp)) ....................................... [ PASS]
(fmt #f (pretty (let ((ones (list 1))) (set-cdr! ones ones) `(l... ... [ PASS]
(fmt #f (fmt-join (lambda (x) (cat "\"" (slashified x #\" #f) "... ... [ PASS]
(fmt #f (fmt-join (cut maybe-slashified <> char-whitespace? #\"... ... [ PASS]
(fmt #f (fmt-columns (list dsp "abc\ndef\n"))) ....................... [ PASS]
(fmt #f (fmt-columns (list dsp "abc\ndef\n") (list dsp "123\n45... ... [ PASS]
(fmt #f (fmt-columns (list dsp "abc\ndef\n") (list dsp "123\n45... ... [ PASS]
(fmt #f (fmt-columns (list dsp "abc\ndef") (list dsp "123\n456\... ... [ PASS]
(fmt #f (fmt-columns (list dsp "abc\ndef\nghi\n") (list dsp "12... ... [ PASS]
(fmt #f (fmt-columns (list dsp "abc\ndef\n") (list dsp "123\n45... ... [ PASS]
(fmt #f (fmt-columns (list (cut pad/right 5 <>) "abc\ndef\n") (... ... [ PASS]
(fmt #f (fmt-columns (list (compose upcase (cut pad/right 5 <>)... ... [ PASS]
(fmt #f (fmt-columns (list (compose (cut pad/right 5 <>) upcase... ... [ PASS]
(fmt #f (with-width 8 (wrap-lines "hello world"))) ................... [ PASS]
(fmt #f (wrap-lines "    ")) ......................................... [ PASS]
(fmt #f (with-width 20 (columnar 6 (dsp "foo") (wrap-lines "abc... ... [ PASS]
(fmt #f (with-width 10 (justify "The quick brown fox jumped ove... ... [ PASS]
(fmt #f (with-width 67 (wrap-lines "his message (http://lists.n... ... [ PASS]
(fmt #f (with-width 36 (wrap-lines "The fundamental list iterat... ... [ PASS]
(fmt #f (with-width 36 (justify "The fundamental list iterator.... ... [ PASS]
(fmt #f (fmt-columns (list (cut pad/right 36 <>) (with-width 36... ... [ PASS]
(fmt #f (with-width 76 (columnar (pretty '(define (fold kons kn... ... [ PASS]
(fmt #f (columnar 9 (dsp "- Item 1:") " " (with-width 20 (wrap-... ... [ PASS]
(fmt #f (columnar 9 (dsp "- Item 1:\n") " " (with-width 20 (wra... ... [ PASS]
(fmt #f (pad-char #\- (columnar 9 (dsp "- Item 1:\n") " " (with... ... [ PASS]
(fmt #f (pad-char #\- (with-width 20 (columnar (dsp "abc"))))) ....... [ PASS]
152 tests completed in 0.143 seconds.
152 out of 152 (100%) tests passed.
-- done testing fmt ----------------------------------------------------------


-- testing fmt-c -------------------------------------------------------------
(fmt #f (c-if 1 2 3)) ................................................ [ PASS]
(fmt #f (c-if (c-if 'x 'y 'z) 2 3)) .................................. [ PASS]
(fmt #f (c-fun 'int 'square '((int x)) (c* 'x 'x))) .................. [ PASS]
(fmt #f (c-fun 'int 'foo '((int x) (int y) (int z)) (c-if (c-if... ... [ PASS]
(fmt #f (c-fun 'void 'bar '((int mode) ((%pointer (const char))... ... [ PASS]
(fmt #f (c-while (c!= (c= 'line '(readline)) 'EOF) '(printf "%s... ... [ PASS]
(fmt #f (c-switch 'y (c-case 1 (c= 'x 1)) (c-case 2 (c= 'x 4)) ... ... [ PASS]
(fmt #f (c-switch 'y (c-case 1 (c= 'x 1)) (c-case/fallthrough 2... ... [ PASS]
(fmt #f (c-switch 'y '((1) (= x 1)) '((2) (= x 4)) '(else (= x ... ... [ PASS]
(fmt #f (c-expr '(switch y ((1) (= x 1)) ((2) (= x 4)) (else (=... ... [ PASS]
(fmt #f (c-fun 'int 'q '(x) (c-switch 'x '((1) 1) '((2) 4) '(el... ... [ PASS]
(fmt #f (c-for (c= 'i 0) (c< 'i 'n) (c++/post 'i) '(printf "i: ... ... [ PASS]
(fmt #f (c== (c+ (c* 'a 'x) (c* 'b 'y)) 'c)) ......................... [ PASS]
(fmt #f (c-expr '(== (+ (* a x) (* b y)) c))) ........................ [ PASS]
(fmt #f (c-expr '(== (* (+ a x) (+ b y)) c))) ........................ [ PASS]
(fmt #f (c-expr '(* (+ abracadabra!!!! xylophone????) (+ banana... ... [ PASS]
(fmt #f (c-expr '(abracadabra xylophone bananarama yellowstonep... ... [ PASS]
(fmt #f (cpp-define '(foo (int x) (int y)) (c+ 'x 'y))) .............. [ PASS]
(fmt #f (cpp-define '(min x y) (c-if (c< 'x 'y) 'x 'y))) ............. [ PASS]
(fmt #f (cpp-define '(foo x y) '(abracadabra (+ x y) xylophone ... ... [ PASS]
(fmt #f (cpp-wrap-header 'FOO_H (c-extern (c-prototype 'int 'fo... ... [ PASS]
(fmt #f (c-comment " this is a " (c-comment " nested ") " comme... ... [ PASS]
(fmt #f (c-expr `(switch y ((1) (= x 1)) ,(cpp-ifdef 'H_TWO (c-... ... [ PASS]
(fmt #f (c-expr '(%define (eprintf . args) (fprintf stderr args... ... [ PASS]
(fmt #f (c-expr `(struct point (x y)))) .............................. [ PASS]
(fmt #f (c-expr `(struct employee ((short age) ((%pointer char)... ... [ PASS]
(fmt #f (c-class 'employee '((short age) ((%pointer char) name)... ... [ PASS]
(fmt #f (c-expr '(union object ((char tag) ((struct ((char tag)... ... [ PASS]
(fmt #f (c-expr '(enum type_tags ((TYPE_CHAR 1) TYPE_FIXNUM TYP... ... [ PASS]
(fmt #f (radix 16 (cpp-define 'OP_EVAL 254))) ........................ [ PASS]
(fmt #f (c-var '(%array (unsigned long) SIZE) 'table '#(1 2 3 4))) ... [ PASS]
(fmt #f (c-var '(%array (* int)) 'array_of_ptr)) ..................... [ PASS]
(fmt #f (c-var '(* (%array int)) 'ptr_to_array)) ..................... [ PASS]
(fmt #f (c-var '(* (* foo)) 'table '#(#(1 "foo") #(2 "bar") #(3... ... [ PASS]
(fmt #f (c-var '(%fun sexp (sexp sexp)) 'f 'NULL)) ................... [ PASS]
(fmt #f (c-var '(%fun (%fun sexp (sexp)) (sexp sexp)) 'f 'NULL)) ..... [ PASS]
(fmt #f (c-typedef '(%fun double ((* double) double int)) 'f)) ....... [ PASS]
37 tests completed in 0.074 seconds.
37 out of 37 (100%) tests passed.
-- done testing fmt-c --------------------------------------------------------