~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to ansi-tests/directory.lsp

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;-*- Mode:     Lisp -*-
 
2
;;;; Author:   Paul Dietz
 
3
;;;; Created:  Thu Jan  1 12:00:18 2004
 
4
;;;; Contains: Tests of DIRECTORY
 
5
 
 
6
(in-package :cl-test)
 
7
 
 
8
(deftest directory.1
 
9
  (directory "nonexistent")
 
10
  nil)
 
11
 
 
12
(deftest directory.2
 
13
  (directory #p"nonexistent")
 
14
  nil)
 
15
 
 
16
(deftest directory.3
 
17
  (directory "nonexistent" :allow-other-keys nil)
 
18
  nil)
 
19
 
 
20
(deftest directory.4
 
21
  (directory "nonexistent" :allow-other-keys t :foo 'bar)
 
22
  nil)
 
23
 
 
24
(deftest directory.5
 
25
  (directory "nonexistent" :foo 0 :allow-other-keys t)
 
26
  nil)
 
27
 
 
28
(deftest directory.6
 
29
  (let* ((pattern-pathname (make-pathname :name :wild :type :wild
 
30
                                          :defaults *default-pathname-defaults*))
 
31
         (pathnames (directory pattern-pathname)))
 
32
    (values
 
33
     (remove-if #'pathnamep pathnames)
 
34
     (loop for pn in pathnames
 
35
           unless (equal pn (truename pn))
 
36
           collect pn)
 
37
;;     (loop for pn in pathnames
 
38
;;         unless (pathname-match-p pn pattern-pathname)
 
39
;;         collect pn))
 
40
     ))
 
41
  nil nil ;; nil
 
42
  )
 
43
 
 
44
(deftest directory.7
 
45
  (let* ((pattern-pathname (make-pathname :name :wild :type :wild
 
46
                                          :defaults *default-pathname-defaults*))
 
47
         (pathnames (directory pattern-pathname)))
 
48
    (loop for pn in pathnames
 
49
          unless (equal pn (probe-file pn))
 
50
          collect pn))
 
51
  nil)
 
52
 
 
53
(deftest directory.8
 
54
  (let* ((pathname-pattern "CLTEST:*.*")
 
55
         (len (length (directory pathname-pattern))))
 
56
    (if (< len 500) len nil))
 
57
  nil)
 
58
 
 
59
(deftest directory.error.1
 
60
  (signals-error (directory) program-error)
 
61
  t)