]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak previous bytecomp-tests.el change
authorGlenn Morris <rgm@gnu.org>
Thu, 22 May 2014 02:33:07 +0000 (19:33 -0700)
committerGlenn Morris <rgm@gnu.org>
Thu, 22 May 2014 02:33:07 +0000 (19:33 -0700)
* test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
Fix handling of temporary elc files.

test/ChangeLog
test/automated/bytecomp-tests.el

index d42c0174a2cc27f2bc6d5cef66c7893b775fd876..d56e62283b4ed686c32ab9d585f841e75f8ac686 100644 (file)
@@ -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.
index c109a12c468ba05c65beb39a1505fb3e4ee2ea3a..1d96f1cdfcecaa7bef48c7bbdef1d8ebf767963a 100644 (file)
@@ -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))