test-version.script 752 Bytes
Newer Older
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
;; -*- lisp -*-

(load "../asdf")
(setf asdf:*central-registry* '(*default-pathname-defaults*))

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

(in-package :test-version-system)

(defsystem :versioned-system-1
  :pathname #.*default-pathname-defaults*
  :version "1.0")

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

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

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