From: Glenn Morris Date: Thu, 22 May 2014 02:33:07 +0000 (-0700) Subject: Tweak previous bytecomp-tests.el change X-Git-Tag: emacs-25.0.90~2612^2~709^2~902 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ff965efb03f29b5003c8ace7cfe4510f643b8706;p=emacs.git Tweak previous bytecomp-tests.el change * test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load): Fix handling of temporary elc files. --- diff --git a/test/ChangeLog b/test/ChangeLog index d42c0174a2c..d56e62283b4 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,7 +1,7 @@ 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. diff --git a/test/automated/bytecomp-tests.el b/test/automated/bytecomp-tests.el index c109a12c468..1d96f1cdfce 100644 --- a/test/automated/bytecomp-tests.el +++ b/test/automated/bytecomp-tests.el @@ -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))