pathname-version.lsp 935 Bytes
Newer Older
1 2 3 4 5
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sat Dec  6 14:45:16 2003
;;;; Contains: Tests for PATHNAME-VERSION

6

7

8

pfdietz's avatar
pfdietz committed
9

10 11
(deftest pathname-version.1
  (loop for p in *pathnames*
sds's avatar
sds committed
12 13 14
        for version = (pathname-version p)
        unless (or (integerp version) (symbolp version))
        collect (list p version))
15 16
  nil)

17 18 19
;;; section 19.3.2.1
(deftest pathname-version.2
  (loop for p in *logical-pathnames*
sds's avatar
sds committed
20 21
        when (eq (pathname-version p) :unspecific)
        collect p)
22 23
  nil)

pfdietz's avatar
pfdietz committed
24 25 26 27
(deftest pathname-version.3
  (do-special-strings (s "" nil) (pathname-version s))
  nil)

28
(deftest pathname-version.error.1
29 30
  (signals-error (pathname-version) program-error)
  t)
31 32

(deftest pathname-version.error.2
33
  (signals-error (pathname-version *default-pathname-defaults* nil)
sds's avatar
sds committed
34
                 program-error)
35
  t)
36 37

(deftest pathname-version.error.3
pfdietz's avatar
pfdietz committed
38
  (check-type-error #'pathname-version #'could-be-pathname-designator)
39 40
  nil)