test-utilities.script 1.97 KB
Newer Older
1
2
;;; -*- Lisp -*-
(load "script-support")
3
(load-asdf)
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(in-package :asdf)
(cl-user::quit-on-error

(assert
 (every #'directory-pathname-p
  (list
   (make-pathname :name nil :type "" :directory '(:absolute "tmp"))
   (make-pathname :name "" :directory '(:absolute "tmp"))
   (make-pathname :type "" :directory '(:absolute "tmp"))
;; CLHS 19.2.2.2.3 says we can't portably specify :unspecific here,
;; and some implementations will enforce it.
;;   (make-pathname :type :unspecific :directory '(:absolute "tmp"))
;;   (make-pathname :name :unspecific :directory '(:absolute "tmp"))
;;   (make-pathname :name :unspecific :directory '(:absolute "tmp"))
   )))
(assert
 (every (complement #'directory-pathname-p)
  (list
   (make-pathname :name "foo" :type nil :directory '(:absolute "tmp"))
23
24
25
26
   (make-pathname :name nil :type "bar" :directory '(:absolute "tmp")))))
;; These are funky and non portable. Omit from tests.
;; (make-pathname :name "." :type nil :directory '(:absolute "tmp"))
;; (make-pathname :name "." :type "" :directory '(:absolute "tmp"))
27
28
29
30
31
32
33
34
35
36
37
38
(assert (equal (multiple-value-list (component-name-to-pathname-components "" t))
               '(:relative nil nil)))
(assert (equal (multiple-value-list (component-name-to-pathname-components "" nil))
               '(:relative nil nil)))
(assert (equal (multiple-value-list (component-name-to-pathname-components "/" t))
               '(:absolute nil nil)))
(assert (equal (multiple-value-list (component-name-to-pathname-components "/" nil))
               '(:absolute nil nil)))
(assert (equal (multiple-value-list (component-name-to-pathname-components "/aa/ba" t))
               '(:absolute ("aa" "ba") nil)))
(assert (equal (multiple-value-list (component-name-to-pathname-components "/aa/ba" nil))
               '(:absolute ("aa") "ba")))
39
40
41
(assert
 (asdf::version-satisfies (asdf:asdf-version) (asdf:asdf-version)))
(assert
42
 (asdf::version-satisfies (asdf:asdf-version) "2.000"))
43
44
(assert
 (not (asdf::version-satisfies (asdf:asdf-version) "666")))
45
)