test-version.script 611 Bytes
Newer Older
1
;;; -*- Lisp -*-
2

3
4
5
(def-test-system :versioned-system-1
  :pathname #.*test-directory*
  :version "1.0")
6

7
8
9
(def-test-system :versioned-system-2
  :pathname #.*test-directory*
  :version "1.1")
10

11
12
13
14
(def-test-system :versioned-system-3
  :defsystem-depends-on ((:version :test-asdf/file2 "2.1"))
  :pathname #.*test-directory*
  :version "1.2")
15

16
17
18
19
20
21
(defun vtest (name v &optional (true t))
  (or (eq true (version-satisfies (find-system name) v))
      (error "no satisfaction: ~S version ~A not ~A" name v true)))
(vtest :versioned-system-1 "1.0")
(vtest :versioned-system-2 "1.0")
(vtest :versioned-system-3 "2.0" nil)