From ff965efb03f29b5003c8ace7cfe4510f643b8706 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 21 May 2014 19:33:07 -0700 Subject: [PATCH] Tweak previous bytecomp-tests.el change * test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load): Fix handling of temporary elc files. --- test/ChangeLog | 2 +- test/automated/bytecomp-tests.el | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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)) -- 2.39.2