Commit ff965efb authored by Glenn Morris's avatar Glenn Morris
Browse files

Tweak previous bytecomp-tests.el change

* test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
Fix handling of temporary elc files.
parent f23423f3
2014-05-22 Glenn Morris <>
* 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."
(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")))
(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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment