From: Mark H Weaver <mhw@netris.org>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Make temp file in coding.test work on MS-Windows
Date: Tue, 12 Aug 2014 17:35:11 -0400 [thread overview]
Message-ID: <871tslbddc.fsf@yeeloong.lan> (raw)
In-Reply-To: <87tx5hfotj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 12 Aug 2014 22:14:16 +0200")
ludo@gnu.org (Ludovic Courtès) writes:
> Eli Zaretskii <eliz@gnu.org> skribis:
>
>> I've built Guile 2.0.11 on another system, and found a problem in
>> coding.test: it assumes that /tmp exists, and creates the temporary
>> files there. Here's the patch to make that more portable:
>>
>> --- test-suite/tests/coding.test~0 2014-01-21 23:45:02.000000000 +0200
>> +++ test-suite/tests/coding.test 2014-08-09 13:16:46.416750000 +0300
>> @@ -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-concatenate (list tmpdir "/coding-test.XXXXXX")))
>> (port (mkstemp! name)))
>> (let ((res (with-throw-handler
>> #t
>
> OK to commit, thanks.
Please untabify the lines you changed, and use 'string-append' instead
of 'string-concatenate'.
Thanks!
Mark
next prev parent reply other threads:[~2014-08-12 21:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-09 14:16 Make temp file in coding.test work on MS-Windows Eli Zaretskii
2014-08-12 20:14 ` Ludovic Courtès
2014-08-12 21:35 ` Mark H Weaver [this message]
2014-08-13 1:30 ` Nala Ginrut
2014-08-13 3:02 ` Mark H Weaver
2014-08-13 15:43 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871tslbddc.fsf@yeeloong.lan \
--to=mhw@netris.org \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).