Test output for easy-args [ok]
Testing time: 8s
/home/mario/local/chicken-4.8.0.3/bin/csi -script run.scm < /dev/null (begin (define-arguments (bool) (num 1) (sym (quote foo)) (str "bar")) (list (bool) (num) (sym) (str))) => (#f 1 foo "bar") ; correct (begin (define-arguments ((bool)) ((num) 1) ((sym) (quote foo)) ((str) "bar")) (list (bool) (num) (sym) (str))) => (#f 2 baz "qux") ; correct (begin (define-arguments (b) (n 1) (m (quote foo)) (r "bar")) (list (b) (n) (m) (r))) => (#t 2 baz "qux") ; correct (begin (define-arguments ((num number n) 1)) (num)) => 3 ; correct (begin (define-arguments (*earmuffs* (quote foo))) (*earmuffs*)) => bar ; correct (begin (define-arguments ((str) "foo" (lambda (str) (string-append str "!")))) (str)) => "bar!" ; correct (begin (define-arguments (matched)) (command-line-arguments)) => ("unmatched") ; correct (begin (define-arguments (matched)) (unmatched-arguments)) => ((#\b . #t) ("unmatched" . "ignored")) ; correct (begin (call-with-current-continuation (lambda (k) (invalid-argument-handler (compose k car list)) (handle-exceptions exn ((condition-property-accessor (quote exn) (quote message)) exn) (define-arguments ((foo f) (lambda (x) x))))))) => "invalid default value" ; correct (begin (call-with-current-continuation (lambda (k) (invalid-argument-handler (compose k car list)) (define-arguments ((foo f) "bar"))))) => "value required" ; correct (begin (call-with-current-continuation (lambda (k) (invalid-argument-handler (compose k car list)) (define-arguments ((foo f) 1))))) => "numeric value required" ; correct (begin (call-with-current-continuation (lambda (k) (invalid-argument-handler (compose k car list)) (define-arguments ((foo f))) (foo)))) => "unexpected value" ; correct