-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathload.scm
54 lines (51 loc) · 2 KB
/
load.scm
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
;;; ----------------------------------------------------------------------
;;; Copyright 2007-2008 Alexey Radul.
;;; ----------------------------------------------------------------------
;;; This file is part of Test Manager.
;;;
;;; Test Manager is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation, either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; Test Manager is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with Test Manager. If not, see <http://www.gnu.org/licenses/>.
;;; ----------------------------------------------------------------------
;; load-relative, broken in Guile, depends on MIT Scheme's pathname
;; system.
;; TODO Fix for interactive use?
(cond-expand
(guile
(if (defined? 'load-relative)
'ok
(define (load-relative filename)
;; Guile's load appears to magically do the right thing...
(load (string-concatenate (list filename ".scm"))))))
(else ;; The MIT Scheme that knows it is 'mit' isn't in Debian Stable yet
(define (load-relative filename #!optional environment)
(let ((place (ignore-errors current-load-pathname)))
(if (pathname? place)
(with-working-directory-pathname
(directory-namestring (current-load-pathname))
(lambda () (load filename environment)))
(load filename environment))))))
(load-relative "portability")
(load-relative "ordered-map")
(load-relative "matching")
(load-relative "assertions")
(load-relative "test-runner")
(load-relative "test-group")
(load-relative "testing")
(load-relative "checks")
(load-relative "interactions")
;; MIT Scheme specific features
(cond-expand
(guile
'ok)
(else
'ok))