]> git.eshelyaron.com Git - emacs.git/commitdiff
Delete temp files after icalendar tests
authorStefan Kangas <stefankangas@gmail.com>
Wed, 14 Dec 2022 07:21:34 +0000 (08:21 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 14 Dec 2022 07:21:34 +0000 (08:21 +0100)
* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--get-error-string-for-export): Make sure we clean up
temporary files after test.

test/lisp/calendar/icalendar-tests.el

index fa55eea95e22068259bf06d40cf06dec9fdde5f6..baf4846c8f50139e372afb07bde6ad19f359c8a1 100644 (file)
@@ -63,7 +63,8 @@
 
 (defun icalendar-tests--get-error-string-for-export (diary-string)
   "Call icalendar-export for DIARY-STRING and return resulting error-string."
-  (let ((file (make-temp-file "export.ics")))
+  (ert-with-temp-file file
+    :suffix "-export.ics"
     (with-temp-buffer
       (insert diary-string)
       (icalendar-export-region (point-min) (point-max) file))