(deftest test-stream () (let (path somepath testfile input) (setf path (make-pathname :name "myfile")) (setf somepath (make-pathname :name "somefile")) (setf testfile (make-pathname :name "test.txt")) (with-open-file (out "test.txt" :direction :output :if-does-not-exist :create :if-exists :supersede) (format out "Test")) (with-open-file (in "test.txt" :direction :input) (setf input (read in))) (check (equalp 'nil (equalp path somepath)) (string-equal "Test" input))))