2
;;;; Author: Paul Dietz
3
;;;; Created: Sat Dec 6 14:45:16 2003
4
;;;; Contains: Tests for PATHNAME-TYPE
8
(deftest pathname-type.1
9
(loop for p in *pathnames*
10
for type = (pathname-type p)
11
unless (or (stringp type)
12
(member type '(nil :wild :unspecific)))
13
collect (list p type))
16
(deftest pathname-type.2
17
(loop for p in *pathnames*
18
for type = (pathname-type p :case :local)
19
unless (or (stringp type)
20
(member type '(nil :wild :unspecific)))
21
collect (list p type))
24
(deftest pathname-type.3
25
(loop for p in *pathnames*
26
for type = (pathname-type p :case :common)
27
unless (or (stringp type)
28
(member type '(nil :wild :unspecific)))
29
collect (list p type))
32
(deftest pathname-type.4
33
(loop for p in *pathnames*
34
for type = (pathname-type p :allow-other-keys nil)
35
unless (or (stringp type)
36
(member type '(nil :wild :unspecific)))
37
collect (list p type))
40
(deftest pathname-type.5
41
(loop for p in *pathnames*
42
for type = (pathname-type p :foo 'bar :allow-other-keys t)
43
unless (or (stringp type)
44
(member type '(nil :wild :unspecific)))
45
collect (list p type))
48
(deftest pathname-type.6
49
(loop for p in *pathnames*
50
for type = (pathname-type p :allow-other-keys t :allow-other-keys nil :foo 'bar)
51
unless (or (stringp type)
52
(member type '(nil :wild :unspecific)))
53
collect (list p type))
57
(deftest pathname-type.7
58
(loop for p in *logical-pathnames*
59
when (eq (pathname-type p) :unspecific)
63
(deftest pathname-type.error.1
64
(signals-error (pathname-type) program-error)
67
(deftest pathname-type.error.2
68
(loop for x in *mini-universe*
69
unless (or (could-be-pathname-designator x)
70
(handler-case (progn (pathname-type x) nil)