test-version.script 732 Bytes
Newer Older
1
;;; -*- Lisp -*-
2
(load "script-support.lisp")
3
(load-asdf)
4

5
(setf *central-registry* '(*default-pathname-defaults*))
6

7
(with-test ()
8
 (def-test-system :versioned-system-1
9
10
   :pathname #.*default-pathname-defaults*
   :version "1.0")
11

12
 (def-test-system :versioned-system-2
13
14
   :pathname #.*default-pathname-defaults*
   :version "1.1")
15

16
 (def-test-system :versioned-system-3
17
18
   :pathname #.*default-pathname-defaults*
   :version "1.2")
19

20
 (flet ((test (name v &optional (true t))
21
          (or (eq true (version-satisfies (find-system name) v))
22
              (error "no satisfaction: ~S version ~A not ~A" name v true))))
23
24
   (test :versioned-system-1 "1.0")
   (test :versioned-system-2 "1.0")
25
   (test :versioned-system-3 "2.0" nil)))