;Chapter 7, Bryan Test 1, Page 119-121 (deftest test-streams () (let* ( (path (make-pathname :name "myfile")) ;creates a path (str (open path :direction :output :if-exists :supersede))) ;opens a file for writing using the above name, it will overwrite if already exists (format str "This should be in the file~%") ;writes the string to the files (close str) ;closes the file (setf str (open path :direction :input)) ;reopens the file to read from. (check (equal (read-line str) "This should be in the file")))) ;makes sure that read line is equal to what we wrote.