X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ffilesys.pure.lisp;h=09e770b7a5fdbed64f51751243fb512f12c4c449;hb=683874b497a99cd2c11b6c5d9b47e2785b1ede5f;hp=012bdbfe241ddcda190234d227618cfdd59f18e8;hpb=bbfeb9a341eb81fdd80146f38548437b211dc280;p=sbcl.git diff --git a/tests/filesys.pure.lisp b/tests/filesys.pure.lisp index 012bdbf..09e770b 100644 --- a/tests/filesys.pure.lisp +++ b/tests/filesys.pure.lisp @@ -12,16 +12,17 @@ (in-package "CL-USER") ;;; In sbcl-0.6.9 FOO-NAMESTRING functions returned "" instead of NIL. -(let ((pathname0 (make-pathname :host nil - :directory - (pathname-directory - *default-pathname-defaults*) - :name "getty")) +(let ((pathname0 (make-pathname :host nil + :directory + (pathname-directory + *default-pathname-defaults*) + :name "getty")) (pathname1 (make-pathname :host nil :directory nil :name nil))) (assert (equal (file-namestring pathname0) "getty")) - (assert (equal (directory-namestring pathname0) "")) + (assert (equal (directory-namestring pathname0) + (directory-namestring *default-pathname-defaults*))) (assert (equal (file-namestring pathname1) "")) (assert (equal (directory-namestring pathname1) ""))) @@ -34,3 +35,11 @@ (search "tests/filesys.pure.lisp" (namestring pathname))) dir))) + +;;; ANSI: FILE-LENGTH should signal an error of type TYPE-ERROR if +;;; stream is not a stream associated with a file. +;;; +;;; (Peter Van Eynde's ansi-test suite caught this, and Eric Marsden +;;; reported a fix for CMU CL, which was ported to sbcl-0.6.12.35.) +(assert (typep (nth-value 1 (ignore-errors (file-length *terminal-io*))) + 'type-error))