aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTino Calancha2017-05-06 12:30:48 +0900
committerTino Calancha2017-05-06 12:30:48 +0900
commit966020bc52d26274e950b1d7c7e2072735db699b (patch)
tree38317e0f9c5e18f25ac84e4d183194f9ca61bb5a
parenta95fefd1e699ba683331f2813d0956f4142ba986 (diff)
downloademacs-966020bc52d26274e950b1d7c7e2072735db699b.tar.gz
emacs-966020bc52d26274e950b1d7c7e2072735db699b.zip
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.
-rw-r--r--test/lisp/buff-menu-tests.el6
1 files changed, 2 insertions, 4 deletions
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 @@
27 27
28(ert-deftest buff-menu-24962 () 28(ert-deftest buff-menu-24962 ()
29 "Test for http://debbugs.gnu.org/24962 ." 29 "Test for http://debbugs.gnu.org/24962 ."
30 (let ((file (expand-file-name "foo" temporary-file-directory)) 30 (let* ((file (make-temp-file "foo"))
31 buf) 31 (buf (find-file file)))
32 (unwind-protect 32 (unwind-protect
33 (progn 33 (progn
34 (write-region "foo" nil file)
35 (setq buf (find-file file))
36 (rename-buffer " foo") 34 (rename-buffer " foo")
37 (list-buffers) 35 (list-buffers)
38 (with-current-buffer "*Buffer List*" 36 (with-current-buffer "*Buffer List*"