[racket-dev] Unexpected make-temporary-file behavior

From: Casey Klein (clklein at eecs.northwestern.edu)
Date: Wed Dec 8 13:23:22 EST 2010

The documentation for `make-temporary-file' says, "The `template'
argument must be a format string suitable for use with `format' and
one additional string argument (where the string contains only
digits)."

I take that to mean that the following expression should always produce true:

(regexp-match?
 #px"^\\d*$"
 (file-name-from-path (make-temporary-file "~a")))

It does not, though:

> (make-temporary-file "~a")
#<path:/var/folders/WG/WGoR46pDFjWocHBRaeWetk+++TI/-Tmp-/1291832518-952637879>

Is this a bug, or am I misunderstanding the documentation?


Posted on the dev mailing list.