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

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

7
(quit-on-error
8
9
10
 (defsystem :versioned-system-1
   :pathname #.*default-pathname-defaults*
   :version "1.0")
11

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

16
17
18
 (defsystem :versioned-system-3
   :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)))