From aea843c3d69000faa5b84fb3ac1fd3883f800de3 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 24 May 2022 16:11:01 +0200 Subject: [PATCH] Clean up a test file in /tmp * test/src/buffer-tests.el (test-restore-buffer-modified-p): Clean up autosave file in /tmp. --- test/src/buffer-tests.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el index f6a18acaa64..13d48b31a4f 100644 --- a/test/src/buffer-tests.el +++ b/test/src/buffer-tests.el @@ -1515,7 +1515,11 @@ with parameters from the *Messages* buffer modification." (should (eq (buffer-modified-p) 'autosaved)) (insert "zot") (restore-buffer-modified-p 'autosaved) - (should (eq (buffer-modified-p) 'autosaved)))) + (should (eq (buffer-modified-p) 'autosaved)) + + ;; Clean up. + (when (file-exists-p buffer-auto-save-file-name) + (delete-file buffer-auto-save-file-name)))) (ert-with-temp-file file (with-current-buffer (find-file file) -- 2.39.2