Commit 5c730d87 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Add test for :close-stream variant of with-temporary-file.

parent c81e1193
......@@ -305,6 +305,18 @@
(assert-equal (read-file-lines pn) '("Hello, World"))
(delete-file pn))
(not (probe-file
(let ((s 'outer-s))
(with-temporary-file (:stream s :pathname p :direction :io :prefix "LEP")
(assert (open-stream-p s))
(DBG :wsp s p (probe-file p))
(println "Same thing with :close-stream" s)
(assert-equal s 'outer-s) ;; the stream s (1) has been closed and (2) is no longer in scope.
(assert-equal (read-file-lines p) '("Same thing with :close-stream"))
(DBG :ensure-gethash)
(let ((h (make-hash-table :test 'equal)))
(assert-equal (multiple-value-list (gethash 1 h 2)) '(2 nil))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment