1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

More fixes for deleting files whose ports are not closed.

* test-suite/tests/r6rs-files.test: Close the port after
	using it.

	* test-suite/tests/posix.test ("mkstemp!"): Close the port after
	using it.
This commit is contained in:
Eli Zaretskii 2014-07-02 21:21:52 +03:00
parent 4698a11cbd
commit bc945fadd2
2 changed files with 4 additions and 1 deletions

View file

@ -73,6 +73,7 @@
(str (string-copy template))
(port (mkstemp! str))
(result (not (string=? str template))))
(close-port port)
(delete-file str)
result)))

View file

@ -24,7 +24,9 @@
(with-test-prefix "delete-file"
(pass-if "delete-file deletes file"
(let ((filename (port-filename (mkstemp! "T-XXXXXX"))))
(let* ((port (mkstemp! "T-XXXXXX"))
(filename (port-filename port)))
(close-port port)
(delete-file filename)
(not (file-exists? filename))))