test-version.script 820 Bytes
Newer Older
1
2
;;; -*- Lisp -*-
(load "script-support")
3
(load-asdf)
4
5
6
7
8
9
10
(setf asdf:*central-registry* '(*default-pathname-defaults*))

(defpackage :test-version-system
  (:use :cl :asdf))

(in-package :test-version-system)

11
(cl-user::quit-on-error
12
13
14
 (defsystem :versioned-system-1
   :pathname #.*default-pathname-defaults*
   :version "1.0")
15

16
17
18
 (defsystem :versioned-system-2
   :pathname #.*default-pathname-defaults*
   :version "1.1")
19

20
21
22
 (defsystem :versioned-system-3
   :pathname #.*default-pathname-defaults*
   :version "1.2")
23

24
 (flet ((test (name v &optional (true t))
25
26
          (or (eq true (asdf::version-satisfies (find-system name) v))
              (error "no satisfaction: ~S version ~A not ~A" name v true))))
27
28
29
   (test :versioned-system-1 "1.0")
   (test :versioned-system-2 "1.0")
   (test :versioned-system-3 "2.0" nil))
30

31
 )