Test output for fmt [ok]

Testing time: 0s

'/usr/home/chicken/salmonella/build/salmonella-run-publish/chicken/bin/csi' -script run.scm < /dev/null 2>&1

-- 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 (num 1.2e+23)) ............................................... [ PASS]
(fmt #f (num 1e-05)) ................................................. [ PASS]
(fmt #f (num 1e-06)) ................................................. [ PASS]
(fmt #f (num 1e-07)) ................................................. [ PASS]
(fmt #f (num 2e-06)) ................................................. [ PASS]
(fmt #f (num 0 2)) ................................................... [ PASS]
(fmt #f (num 1 2)) ................................................... [ PASS]
(fmt #f (num 2 2)) ................................................... [ PASS]
(fmt #f (num 3 2)) ................................................... [ PASS]
(fmt #f (num 4 2)) ................................................... [ PASS]
(fmt #f (num -1 2)) .................................................. [ PASS]
(fmt #f (num -2 2)) .................................................. [ PASS]
(fmt #f (num 1.5 2)) ................................................. [ PASS]
(fmt #f (num 0 3)) ................................................... [ PASS]
(fmt #f (num 1 3)) ................................................... [ PASS]
(fmt #f (num 2 3)) ................................................... [ PASS]
(fmt #f (num 3 3)) ................................................... [ PASS]
(fmt #f (num 9 3)) ................................................... [ PASS]
(fmt #f (num 5.5 4)) ................................................. [ 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))) ............................ [ 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 #f (pretty sexp)) ............................................... [ PASS]
(fmt #f (pretty sexp)) ............................................... [ PASS]
(fmt #f (pretty sexp)) ............................................... [ PASS]
(fmt #f (pretty sexp)) ............................................... [ PASS]
(fmt #f (pretty sexp)) ............................................... [ PASS]
(fmt #f (pretty sexp)) ............................................... [ PASS]
(fmt #f (pretty sexp)) ............................................... [ PASS]
(fmt #f (pretty sexp)) ............................................... [ PASS]
(fmt #f (pretty sexp)) ............................................... [ PASS]
(fmt #f (pretty sexp)) ............................................... [ PASS]
(fmt #f (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 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 (with-width 20 (tabular (dsp "a\nbc\ndef\n") " | " (dsp... ... [ PASS]
170 tests completed in 6/25 seconds.
170 out of 170 (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-expr '(if (if x y z) 2 3))) ............................... [ PASS]
(fmt #f (c-expr '(%begin (if (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-expr '(some_function shape x (+ y 1) z))) ................. [ PASS]
(fmt #f (c-expr '(if (&& (< y 255) (== (pred shape x y z) 0)) 2... ... [ PASS]
(fmt #f (c-expr '(vector-ref heightmap (+ i (* k 16))))) ............. [ 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-expr '(switch x ((1 2) (foo)) (else (bar))))) ............. [ PASS]
(fmt #f (c-expr '(switch x (case 1 (foo)) (case (2 3) (bar)) (e... ... [ PASS]
(fmt #f (c-expr '(switch x (case/fallthrough (1 2) (foo)) (else... ... [ PASS]
(fmt #f (c-expr '(switch x ((1 2) (foo)) (default (bar))))) .......... [ PASS]
(fmt #f (c-expr '(switch x (else/fallthrough (bar)) ((1 2) (foo... ... [ 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 '(- 1 (+ 3 2)))) ..................................... [ PASS]
(fmt #f (c-expr '(- 1 (- 3 2)))) ..................................... [ PASS]
(fmt #f (c-expr '(- 1 3 2))) ......................................... [ PASS]
(fmt #f (c-expr '(+ 1 (+ 3 2)))) ..................................... [ PASS]
(fmt #f (c-expr '(+ 1 3 2))) ......................................... [ PASS]
(fmt #f (c-expr '(%and (== x 0) (%or (== y 2) (== y 3))))) ........... [ 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 '(foo (int x) (int y)) '(* 2 (+ x y z)))) ........ [ 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 (cpp-if 'foo 1 'bar 2 'baz 3 4)) ............................. [ 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]
(fmt #f (c-expr "foo\tbar")) ......................................... [ PASS]
(fmt #f (c-expr '(static (%var int i)))) ............................. [ PASS]
57 tests completed in 21/200 seconds.
57 out of 57 (100%) tests passed.
-- done testing fmt-c --------------------------------------------------------