mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Make temporary file in coding.test work on MS-Windows.
* test-suite/tests/coding.test (with-temp-file): Instead of hard-coding "/tmp" as the temporary directory, use $TMPDIR or $TEMP from the environment, and fall back on "/tmp" if none of those 2 is defined.
This commit is contained in:
parent
1e9249e0cd
commit
7c848fe572
1 changed files with 4 additions and 1 deletions
|
@ -20,7 +20,10 @@
|
|||
#:use-module (test-suite lib))
|
||||
|
||||
(define (with-temp-file proc)
|
||||
(let* ((name (string-copy "/tmp/coding-test.XXXXXX"))
|
||||
(let* ((tmpdir (or (getenv "TMPDIR")
|
||||
(getenv "TEMP")
|
||||
"/tmp"))
|
||||
(name (string-append tmpdir "/coding-test.XXXXXX"))
|
||||
(port (mkstemp! name)))
|
||||
(let ((res (with-throw-handler
|
||||
#t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue