diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-main.csc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test-main.csc b/tests/test-main.csc new file mode 100644 index 0000000..c10c882 --- /dev/null +++ b/tests/test-main.csc @@ -0,0 +1,21 @@ +(import (scheme base) + (only (csc testing) + test-main) + (only (scheme eval) + environment)) + + +(define (filename->library f) + (call-with-input-file f + (lambda (p) + ; (define-library <name> ... + (cadr (read p))))) + + +; Guile's load function allows import forms, but by a strict reading of R7RS, +; load can only handle expressions and definitions. I'm working around this by +; defining each test as a library, and using the environment procedure to load +; the libraries at runtime. Somehow this should be more portable. +(apply environment + (map filename->library (cdr (command-line)))) +(test-main) |
