Delete temp files after icalendar tests

* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--get-error-string-for-export): Make sure we clean up
temporary files after test.
This commit is contained in:
Stefan Kangas 2022-12-14 08:21:34 +01:00
parent 33e0a10464
commit 3efe4df1d2

View file

@ -63,7 +63,8 @@
(defun icalendar-tests--get-error-string-for-export (diary-string) (defun icalendar-tests--get-error-string-for-export (diary-string)
"Call icalendar-export for DIARY-STRING and return resulting error-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 (with-temp-buffer
(insert diary-string) (insert diary-string)
(icalendar-export-region (point-min) (point-max) file)) (icalendar-export-region (point-min) (point-max) file))