aboutsummaryrefslogtreecommitdiff
path: root/tests/run-tests.scm
blob: e68f058bd795633f1e9c44c4a8931b2f9038731d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/guile \
-s
!#

(eval-when (compile load)
 (define here (dirname (current-filename))))

(add-to-load-path (format #f "~a/module"
                          (dirname here)))


(use-modules (ice-9 ftw)
             (ice-9 sandbox))

(define files
  (scandir here
           (lambda (name)
             (and (< 2 (string-length name))
                  (not (string=? name (basename (current-filename))))
                  (string=? "scm" (string-take-right name 3))))))

(setenv "TESTPATH"
        (format #f "~a/testdata" (dirname here)))

(use-modules (srfi srfi-64))

;; Load tests

(add-to-load-path here)
(for-each load-from-path files)

;; Final test, triggers output
(test-begin "metatest")
(test-assert #t)
(test-expect-fail 1)
(test-assert #f)
(test-end "metatest")