1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

(mkstemp!): New tests.

This commit is contained in:
Kevin Ryde 2004-08-20 01:36:28 +00:00
parent d4f76919e6
commit 95c098ddd9

View file

@ -53,6 +53,29 @@
;; (execle "./nosuchprog" '("FOO=1" "BAR=2") "./nosuchprog" "some arg")))
;;
;; mkstemp!
;;
(with-test-prefix "mkstemp!"
;; the temporary names used in the tests here are kept to 8 characters so
;; they'll work on a DOS 8.3 file system
(define (string-copy str)
(list->string (string->list str)))
(pass-if-exception "number arg" exception:wrong-type-arg
(mkstemp! 123))
(pass-if "filename string modified"
(let* ((template "T-XXXXXX")
(str (string-copy template))
(port (mkstemp! str))
(result (not (string=? str template))))
(delete-file str)
result)))
;;
;; putenv
;;