aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-05-21 19:33:07 -0700
committerGlenn Morris2014-05-21 19:33:07 -0700
commitff965efb03f29b5003c8ace7cfe4510f643b8706 (patch)
tree5d8b7fdcfbb8244968453733043e9e4cc90afa91
parentf23423f322a99144efb04fee994408f2570fb80f (diff)
downloademacs-ff965efb03f29b5003c8ace7cfe4510f643b8706.tar.gz
emacs-ff965efb03f29b5003c8ace7cfe4510f643b8706.zip
Tweak previous bytecomp-tests.el change
* test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load): Fix handling of temporary elc files.
-rw-r--r--test/ChangeLog2
-rw-r--r--test/automated/bytecomp-tests.el5
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 @@
12014-05-22 Glenn Morris <rgm@gnu.org> 12014-05-22 Glenn Morris <rgm@gnu.org>
2 2
3 * automated/bytecomp-tests.el (test-byte-comp-compile-and-load): 3 * automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
4 Avoid leaving empty .elc tempfiles behind. 4 Fix handling of temporary elc files.
5 5
6 * automated/fns-tests.el (fns-tests-nreverse): 6 * automated/fns-tests.el (fns-tests-nreverse):
7 Update for changed string behavior. 7 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."
312 (progn 312 (progn
313 (setf elfile (make-temp-file "test-bytecomp" nil ".el")) 313 (setf elfile (make-temp-file "test-bytecomp" nil ".el"))
314 (when compile 314 (when compile
315 (setf elcfile (concat elfile "c"))) 315 (setf elcfile (make-temp-file "test-bytecomp" nil ".elc")))
316 (with-temp-buffer 316 (with-temp-buffer
317 (dolist (form forms) 317 (dolist (form forms)
318 (print form (current-buffer))) 318 (print form (current-buffer)))
319 (write-region (point-min) (point-max) elfile)) 319 (write-region (point-min) (point-max) elfile))
320 (if compile 320 (if compile
321 (let ((byte-compile-dest-file elcfile)) 321 (let ((byte-compile-dest-file-function
322 (lambda (e) elcfile)))
322 (byte-compile-file elfile t)) 323 (byte-compile-file elfile t))
323 (load elfile))) 324 (load elfile)))
324 (when elfile (delete-file elfile)) 325 (when elfile (delete-file elfile))