From: Tino Calancha Date: Sat, 6 May 2017 03:30:48 +0000 (+0900) Subject: Ensure the created temp file in a test is new X-Git-Tag: emacs-26.0.90~521^2~461 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=966020bc52d26274e950b1d7c7e2072735db699b;p=emacs.git 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. --- diff --git a/test/lisp/buff-menu-tests.el b/test/lisp/buff-menu-tests.el index 43214f25060..21ffb2ebf36 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*"