From acc561366f3fe6ec0377103f52ef0f7e923711c9 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Mon, 1 Aug 2022 19:35:19 -0700 Subject: 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. --- tests/test-main.csc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/test-main.csc (limited to 'tests') 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 ... + (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) -- cgit v1.3.1