[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue #1204: fix font-name-add-files regtest (issue 573730044 by add
From: |
v . villenave |
Subject: |
Re: Issue #1204: fix font-name-add-files regtest (issue 573730044 by address@hidden) |
Date: |
Mon, 20 Apr 2020 06:36:57 -0700 |
Reviewers: dak,
Message:
On 2020/04/20 12:05:15, dak wrote:
>
https://codereview.appspot.com/573730044/diff/583810043/input/regression/font-name-add-files.ly
> File input/regression/font-name-add-files.ly (right):
>
>
https://codereview.appspot.com/573730044/diff/583810043/input/regression/font-name-add-files.ly#newcode25
> input/regression/font-name-add-files.ly:25: tmpdir = #(let
((env-tmpdir (getenv
> "TMPDIR")))
> tmpdir = #(or (getenv "TMPDIR") "/tmp")
Indeed. This should have occurred to me (unlike the similar one below).
>
https://codereview.appspot.com/573730044/diff/583810043/input/regression/font-name-add-files.ly#newcode28
> input/regression/font-name-add-files.ly:28: dummyname =
#(port-filename
> (mkstemp! (string-append tmpdir "/" "dummyfont-XXXXXX")))
> This fixes the problem that mkstemp! needs a writable string since
string-append
> returns a newly allocated string.*
Yes, thus eliminating the need for string-copy and such.
>
https://codereview.appspot.com/573730044/diff/583810043/input/regression/font-name-add-files.ly#newcode252
> input/regression/font-name-add-files.ly:252: (if (or (equal? "." f)
> No point in a functional language to write as if expressions and
procedures were
> different things. Just write
>
> (or (equal? "." f) (equal? ".." f)
> (delete-file (string-append ...)))
Heh. I actually lifted that part verbatim from framework-ps.scm. That's
a nice, concise and elegant syntax, it wouldn't have occurred to me.
Thanks!
V.
Description:
Issue #1204: fix font-name-add-files regtest
The temporary directory might not be empty if some
versions of fontconfig add a .uuid file inside it.
Please review this at https://codereview.appspot.com/573730044/
Affected files (+294, -2 lines):
M Documentation/notation/text.itely
A input/regression/font-name-add-files.ly