emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 959fcb1: * test/lisp/ibuffer-tests.el: Delete tempo


From: Glenn Morris
Subject: [Emacs-diffs] master 959fcb1: * test/lisp/ibuffer-tests.el: Delete temporary files.
Date: Fri, 21 Jul 2017 21:22:55 -0400 (EDT)

branch: master
commit 959fcb113a4680175db5274efb1e0e23fdd69cfe
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    * 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 56b0d36..af75aa0 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



reply via email to

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