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