X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ffilesys.pure.lisp;h=3e7ab3dcf459615912716460cab9e79267807594;hb=50f728671defadb8f7b1e8691c984cb0e6aba17c;hp=a1800e23b49c5309fa0b7cac23000280ce66a321;hpb=1394636aef3b85be4fb6ef4a5424115aa2022d99;p=sbcl.git diff --git a/tests/filesys.pure.lisp b/tests/filesys.pure.lisp index a1800e2..3e7ab3d 100644 --- a/tests/filesys.pure.lisp +++ b/tests/filesys.pure.lisp @@ -49,8 +49,24 @@ ;; SBCL 0.7.1.2 failed to merge on OPEN (with-open-file (i "tests/filesys.pure.lisp") (assert i))) - +;;; OPEN, LOAD and friends should signal an error of type FILE-ERROR +;;; if they are fed wild pathname designators; firstly, with wild +;;; pathnames that don't correspond to any files: +(assert (typep (nth-value 1 (ignore-errors (open "non-existent*.lisp"))) + 'file-error)) +(assert (typep (nth-value 1 (ignore-errors (load "non-existent*.lisp"))) + 'file-error)) +;;; then for pathnames that correspond to precisely one: +(assert (typep (nth-value 1 (ignore-errors (open "filesys.pur*.lisp"))) + 'file-error)) +(assert (typep (nth-value 1 (ignore-errors (load "filesys.pur*.lisp"))) + 'file-error)) +;;; then for pathnames corresponding to many: +(assert (typep (nth-value 1 (ignore-errors (open "*.lisp"))) + 'file-error)) +(assert (typep (nth-value 1 (ignore-errors (load "*.lisp"))) + 'file-error)) ;;; ANSI: FILE-LENGTH should signal an error of type TYPE-ERROR if ;;; STREAM is not a stream associated with a file.