From 959fcb113a4680175db5274efb1e0e23fdd69cfe Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 21 Jul 2017 21:22:49 -0400 Subject: [PATCH] * test/lisp/ibuffer-tests.el: Delete temporary files. --- test/lisp/ibuffer-tests.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/lisp/ibuffer-tests.el b/test/lisp/ibuffer-tests.el index 56b0d36afdc..af75aa0ec7f 100644 --- a/test/lisp/ibuffer-tests.el +++ b/test/lisp/ibuffer-tests.el @@ -150,6 +150,7 @@ ;; Test Filter Inclusion (let* (test-buffer-list ; accumulated buffers to clean up + test-file-list ;; Utility functions without polluting the environment (set-buffer-mode (lambda (buffer mode) @@ -192,6 +193,7 @@ (file (make-temp-file prefix nil suffix)) (buf (find-file-noselect file t))) (push buf test-buffer-list) ; record for cleanup + (push file test-file-list) (funcall set-buffer-mode buf mode) (funcall set-buffer-contents buf size include) buf))) @@ -213,6 +215,8 @@ (clean-up (lambda () "Restore all emacs state modified during the tests" + (dolist (f test-file-list) + (and f (file-exists-p f) (delete-file f))) (while test-buffer-list ; created temporary buffers (let ((buf (pop test-buffer-list))) (with-current-buffer buf (bury-buffer)) ; ensure not selected -- 2.39.2