File: test.lisp

package info (click to toggle)
cl-iterate 20210519.gitb0f9a9c-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 980 kB
  • sloc: lisp: 4,050; sh: 238; makefile: 60
file content (49 lines) | stat: -rw-r--r-- 1,597 bytes parent folder | download
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
(in-package :common-lisp-user)

(require :asdf)

(asdf:initialize-output-translations
 `(:output-translations
   (t ,(merge-pathnames (make-pathname
                         :directory '(:relative "test" "cache" :wild-inferiors)
                         :name :wild :type :wild)
                        *load-truename*))
   :ignore-inherited-configuration
   ))

(asdf:load-asd (merge-pathnames (make-pathname
                                 :name "iterate"
                                 :type "asd")
                                *load-truename*))

(format t "~&Successfully loaded the iterate ASD file.~%")

#-sbcl
(asdf:load-asd (merge-pathnames (make-pathname
                                 :name "rt"
                                 :type "asd"
                                 :directory
                                 '(:relative "ext" "rt"))
                                *load-truename*))


(if (not (asdf:find-system "iterate"))
    (progn
     (format t "~&Unable to find the iterate ASDF system definition.~%")
     (uiop:quit 1))
    (format t "~&Found iterate ASDF system definition.~%"))



(asdf:load-system "iterate/tests")

(handler-bind ((iterate.test::unexpected-failures-error
                 #'(lambda (e)
                     (declare (ignorable e))
                     (format t "~&Catching unexpected failures error.~%")
                     (uiop:quit 2)))
               (error #'(lambda (e)
                          (format t "~&Caught unexpected error ~a~%" e)
                          (uiop:quit 3))))
  (asdf:test-system "iterate")
  (uiop:quit 0))