Add new test
[scheme.git] / tests.scm
index 168cf6613d4559b6403c97af1a858e35405eed3f..0e70480b41eb93a80134bfb9f124792f9b5b758f 100644 (file)
--- a/tests.scm
+++ b/tests.scm
 (define (test-prog prog exit-code)
   (display prog)
   (newline)
-  (compile-to-binary prog "/tmp/test-prog")
+  (compile-to-binary prog "/tmp/test-prog" 'darwin)
   (test (system "/tmp/test-prog") exit-code))
 
 (define (test-prog-stdout prog output)
   (display prog)
   (newline)
-  (compile-to-binary prog "/tmp/test-prog")
+  (compile-to-binary prog "/tmp/test-prog" 'darwin)
   (system "/tmp/test-prog > /tmp/test-output.txt")
   (let ((str (read-file "/tmp/test-output.txt")))
     (test str output)))
@@ -51,3 +51,6 @@
 
                                        ; passing closures about
 (test-prog '((lambda (z) ((lambda (x) (x 1)) (lambda (y) (+ z y)))) 2) 3)
+
+                                       ; passing builtins about
+(test-prog '((lambda (x) ((lambda (a b) (a b 3)) + x)) 3) 6)