diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2022-08-01 19:35:19 -0700 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2022-08-01 19:35:19 -0700 |
| commit | acc561366f3fe6ec0377103f52ef0f7e923711c9 (patch) | |
| tree | d7a19cfbad78a69ebea71b27302e708c0655863d /tests | |
| parent | 99ce19a8053a93457885f32ec54c1c5b7c1961c1 (diff) | |
| download | chromatopelma-acc561366f3fe6ec0377103f52ef0f7e923711c9.tar.zst | |
Modify the project structure.
Now the lib directory contains what will eventually end up on the
user's /usr/lib/csc. When I write make install, it will copy all of
the .csc files from lib into the destination lib directory. This means I
can start working on the standard library in lib/scheme.
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) |
