emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 966020b: Ensure the created temp file in a test is


From: Tino Calancha
Subject: [Emacs-diffs] master 966020b: Ensure the created temp file in a test is new
Date: Fri, 5 May 2017 23:32:52 -0400 (EDT)

branch: master
commit 966020bc52d26274e950b1d7c7e2072735db699b
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    Ensure the created temp file in a test is new
    
    * test/lisp/buff-menu-tests.el (buff-menu-24962): Use `make-temp-file'
    to create the temp file.
---
 test/lisp/buff-menu-tests.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/test/lisp/buff-menu-tests.el b/test/lisp/buff-menu-tests.el
index 43214f2..21ffb2e 100644
--- a/test/lisp/buff-menu-tests.el
+++ b/test/lisp/buff-menu-tests.el
@@ -27,12 +27,10 @@
 
 (ert-deftest buff-menu-24962 ()
   "Test for http://debbugs.gnu.org/24962 ."
-  (let ((file (expand-file-name "foo" temporary-file-directory))
-        buf)
+  (let* ((file (make-temp-file "foo"))
+         (buf (find-file file)))
     (unwind-protect
         (progn
-          (write-region "foo" nil file)
-          (setq buf (find-file file))
           (rename-buffer " foo")
           (list-buffers)
           (with-current-buffer "*Buffer List*"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]