Newer
Older
;;; -*- Lisp -*-
(load "script-support.lisp")
(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"))
(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"))
Francois-Rene Rideau
committed
(assert (equal (multiple-value-list (component-name-to-pathname-components "" :force-directory t))
'(:relative nil nil)))
Francois-Rene Rideau
committed
(assert (equal (multiple-value-list (component-name-to-pathname-components "" :force-directory nil))
'(:relative nil nil)))
Francois-Rene Rideau
committed
(assert (equal (multiple-value-list (component-name-to-pathname-components "/" :force-directory t))
'(:absolute nil nil)))
Francois-Rene Rideau
committed
(assert (equal (multiple-value-list (component-name-to-pathname-components "/" :force-directory nil))
'(:absolute nil nil)))
Francois-Rene Rideau
committed
(assert (equal (multiple-value-list (component-name-to-pathname-components "/aa/ba" :force-directory t))
'(:absolute ("aa" "ba") nil)))
Francois-Rene Rideau
committed
(assert (equal (multiple-value-list (component-name-to-pathname-components "/aa/ba" :force-directory nil))
'(:absolute ("aa") "ba")))
Francois-Rene Rideau
committed
(assert
(version-satisfies (asdf-version) (asdf-version)))
Francois-Rene Rideau
committed
(assert
(version-satisfies (asdf-version) "2.000"))
Francois-Rene Rideau
committed
(assert
(not (version-satisfies (asdf-version) "666")))
(assert
(equal (asdf::split-absolute-pathnames "/foo:/bar" "baz") '("/foo" "/bar")))
(assert (equal (mapcar 'asdf::location-function-p
'((:function f)
(:function (lambda (path absolute-source)
(declare (ignore absolute-source))
path))
(function previous-isnt-keyword)
(:function f too many arguments)
(:function (:lambda isnt lambda))
(:function (lambda (too many args) blah))))
'(t t nil nil nil nil)))