aboutsummaryrefslogtreecommitdiffstats
path: root/csc/test-main.csc
blob: 184d069f60a22b307e3c131455ab4b03aeb45fc0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(import (scheme base)
        (only (csc testing)
          test-main)
        (only (scheme eval)
          environment))


(define (filename->library f)
  (list 'csc (string->symbol (substring f 0 (- (string-length f) 4)))))


; 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)