Test output for locals [ok]

Testing time: 0s

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

Testing LOCAL ...
----------------------------
(local ((define-syntax xx (syntax-rules () ((_ x) (* x x))))
        (define (yy y) 1 2 3 (+ y y))
        (define zz 5)
        (define (uu u . us) #f)
        (define vv (lambda vs 10 20))
        (define (ww . ws) #t))
       (aa (lambda (a) (+ zz (* 2 (xx a)))))
       ((bb b) 4 5 6 (* zz (* (xx b) (xx b))))
       (cc (* 2 zz))
       ((dd) (or (uu 10 20 30) (ww)))
       ((ee e) (vv #t #f)))
... passed in (local?)
(= (aa 2) 13)
... passed in (local?)
(= (bb 2) 80)
... passed in (local?)
(= cc 10)
... passed in (local?)
(dd)
... passed in (local?)
(= (ee 100) 20)
... passed in (local?)
(not (condition-case (vv) ((exn) #f)))
... passed in (local?)
"counter"
... passed in (local?)
(local ((define state 0))
       ((counter-ref) state)
       ((counter-add!) (set! state (+ state 1)))
       ((counter-reset!) (set! state 0)))
... passed in (local?)
(= (counter-ref) 0)
... passed in (local?)
(counter-add!)
... passed in (local?)
(counter-add!)
... passed in (local?)
(= (counter-ref) 2)
... passed in (local?)
(counter-reset!)
... passed in (local?)
(= (counter-ref) 0)
... passed in (local?)

Results of LOCAL
----------------------------
All tests passed