Debian Codegraph @

scheme/run-tests.ss

raw
1 #!../src/ikarus -b ikarus.boot --r6rs-script
2
3 ;;; Ikarus Scheme -- A compiler for R6RS Scheme.
4 ;;; Copyright (C) 2006,2007,2008 Abdulaziz Ghuloum
5 ;;;
6 ;;; This program is free software: you can redistribute it and/or modify
7 ;;; it under the terms of the GNU General Public License version 3 as
8 ;;; published by the Free Software Foundation.
9 ;;;
10 ;;; This program is distributed in the hope that it will be useful, but
11 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ;;; General Public License for more details.
14 ;;;
15 ;;; You should have received a copy of the GNU General Public License
16 ;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18
19 (import (ikarus))
20
21 (define test-libraries '(
22 lists strings bytevectors hashtables fixnums bignums numerics
23 bitwise enums pointers sorting io fasl reader case-folding
24 parse-flonums string-to-number bignum-to-flonum div-and-mod
25 fldiv-and-mod unicode normalization repl set-position guardians
26 symbol-table scribble))
27
28 (define (run-test-from-library x)
29 (printf "[testing ~a] ..." x)
30 (eval '(run-tests) (environment `(tests ,x)))
31 (printf " OK\n"))
32
33 (apply
34 (case-lambda
35 [(script) (for-each run-test-from-library test-libraries)]
36 [(script . test-name*)
37 (let ([test-name* (map string->symbol test-name*)])
38 (for-each
39 (lambda (x)
40 (unless (memq x test-libraries)
41 (error script "invalid test name" x)))
42 test-name*)
43 (for-each run-test-from-library test-name*))])
44 (command-line))
45
46
47 (printf "Happy Happy Joy Joy\n")