From cb52d7f25f4abc34de0c56619a11fa2abaa3bb09 Mon Sep 17 00:00:00 2001 From: pfdietz <pfdietz@localhost> Date: Sun, 12 Sep 2004 13:35:05 +0000 Subject: [PATCH] Added more logical-pathname tests --- ansi-tests/logical-pathname.lsp | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/ansi-tests/logical-pathname.lsp b/ansi-tests/logical-pathname.lsp index 9df218d0..f35c7062 100644 --- a/ansi-tests/logical-pathname.lsp +++ b/ansi-tests/logical-pathname.lsp @@ -10,6 +10,21 @@ always (eql x (logical-pathname x))) t) +(deftest logical-pathname.2 + (notnot-mv (typep (logical-pathname "CLTEST:FOO") 'logical-pathname)) + t) + +(deftest logical-pathname.3 + (let ((name "CLTEST:TEMP.DAT.NEWEST")) + (with-open-file + (s (logical-pathname name) + :direction :output + :if-exists :supersede + :if-does-not-exist :create) + (or (equalt (logical-pathname s) (logical-pathname name)) + (list (logical-pathname s) (logical-pathname name))))) + t) + ;;; Error tests @@ -35,3 +50,47 @@ type-error) t) +(deftest logical-pathname.error.4 + (signals-error + (with-open-stream + (is (make-concatenated-stream)) + (with-open-stream + (os (make-broadcast-stream)) + (with-open-stream + (s (make-two-way-stream is os)) + (logical-pathname s)))) + type-error) + t) + +(deftest logical-pathname.error.5 + (signals-error + (with-open-stream + (is (make-concatenated-stream)) + (with-open-stream + (os (make-broadcast-stream)) + (with-open-stream + (s (make-echo-stream is os)) + (logical-pathname s)))) + type-error) + t) + +(deftest logical-pathname.error.6 + (signals-error (with-open-stream (s (make-broadcast-stream)) (logical-pathname s)) type-error) + t) + +(deftest logical-pathname.error.7 + (signals-error (with-open-stream (s (make-concatenated-stream)) (logical-pathname s)) type-error) + t) + +(deftest logical-pathname.error.8 + (signals-error (with-open-stream (s (make-string-input-stream "foo")) + (logical-pathname s)) type-error) + t) + +(deftest logical-pathname.error.9 + (signals-error (with-output-to-string (s) (logical-pathname s)) type-error) + t) + +(deftest logical-pathname.error.10 + (signals-error (logical-pathname "CLROOT:%") type-error) + t) -- GitLab