Changeset 10064


Ignore:
Timestamp:
09/29/05 13:03:50 (16 years ago)
Author:
piso
Message:

Work in progress.

Location:
trunk/j/src/org/armedbear/lisp/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/tests/file-system-tests.lisp

    r10046 r10064  
    5858                 :directory (pathname-directory *load-truename*)))
    5959
     60(defmacro signals-error (form error-name)
     61  `(locally (declare (optimize safety))
     62     (handler-case ,form
     63       (error (c) (typep c ,error-name))
     64       (:no-error (&rest ignored) (declare (ignore ignored)) nil))))
     65
    6066(defun pathnames-equal-p (pathname1 pathname2)
    6167  #-(or allegro cmu lispworks)
     
    217223(deftest probe-file.1
    218224  (pathnames-equal-p (probe-file *this-file*) *this-file*)
     225  t)
     226
     227(deftest probe-file.2
     228  (let ((pathname #p"."))
     229    #-clisp
     230    (pathnames-equal-p (probe-file pathname) (truename pathname))
     231    #+clisp
     232    ;; "." names a directory, not a file.
     233    (signals-error (probe-file pathname) 'file-error))
     234  t)
     235
     236(deftest probe-file.3
     237  (let ((pathname #p".."))
     238    #-clisp
     239    (pathnames-equal-p (probe-file pathname) (truename pathname))
     240    #+clisp
     241    ;; ".." names a directory, not a file.
     242    (signals-error (probe-file pathname) 'file-error))
    219243  t)
    220244
  • trunk/j/src/org/armedbear/lisp/tests/pathname-tests.lisp

    r10063 r10064  
    22;;;
    33;;; Copyright (C) 2005 Peter Graves
    4 ;;; $Id: pathname-tests.lisp,v 1.36 2005-09-29 01:22:03 piso Exp $
     4;;; $Id: pathname-tests.lisp,v 1.37 2005-09-29 13:03:44 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    358358  t)
    359359
     360(deftest wild.3
     361  #-(or cmu sbcl)
     362  (check-physical-pathname #p"abc*" nil "abc*" nil)
     363  #+(or cmu sbcl)
     364  (wild-pathname-p #p"abc*")
     365  t)
     366
     367(deftest wild.4
     368  #-(or cmu sbcl)
     369  (check-physical-pathname #p"abc?" nil "abc?" nil)
     370  #+(or cmu sbcl)
     371  (wild-pathname-p #p"abc?")
     372  t)
     373
     374(deftest wild.5
     375  #-(or cmu sbcl)
     376  (check-physical-pathname #p"abc[d-h]" nil "abc[d-h]" nil)
     377  #+(or cmu sbcl)
     378  (wild-pathname-p #p"abc[d-h]")
     379  t)
     380
    360381;; Lots of dots.
    361382#+(or allegro abcl cmu)
Note: See TracChangeset for help on using the changeset viewer.