mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-07 12:20:39 -08:00
Tweak previous bytecomp-tests.el change
* test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load): Fix handling of temporary elc files.
This commit is contained in:
parent
f23423f322
commit
ff965efb03
2 changed files with 4 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
2014-05-22 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
|
||||
Avoid leaving empty .elc tempfiles behind.
|
||||
Fix handling of temporary elc files.
|
||||
|
||||
* automated/fns-tests.el (fns-tests-nreverse):
|
||||
Update for changed string behavior.
|
||||
|
|
|
|||
|
|
@ -312,13 +312,14 @@ Subtests signal errors if something goes wrong."
|
|||
(progn
|
||||
(setf elfile (make-temp-file "test-bytecomp" nil ".el"))
|
||||
(when compile
|
||||
(setf elcfile (concat elfile "c")))
|
||||
(setf elcfile (make-temp-file "test-bytecomp" nil ".elc")))
|
||||
(with-temp-buffer
|
||||
(dolist (form forms)
|
||||
(print form (current-buffer)))
|
||||
(write-region (point-min) (point-max) elfile))
|
||||
(if compile
|
||||
(let ((byte-compile-dest-file elcfile))
|
||||
(let ((byte-compile-dest-file-function
|
||||
(lambda (e) elcfile)))
|
||||
(byte-compile-file elfile t))
|
||||
(load elfile)))
|
||||
(when elfile (delete-file elfile))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue