diff options
| -rw-r--r-- | test/lisp/calendar/todo-mode-tests.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/lisp/calendar/todo-mode-tests.el b/test/lisp/calendar/todo-mode-tests.el index 5e1a22b37be..08dfe541929 100644 --- a/test/lisp/calendar/todo-mode-tests.el +++ b/test/lisp/calendar/todo-mode-tests.el | |||
| @@ -44,13 +44,15 @@ | |||
| 44 | 44 | ||
| 45 | (defmacro with-todo-test (&rest body) | 45 | (defmacro with-todo-test (&rest body) |
| 46 | "Set up an isolated todo-mode test environment." | 46 | "Set up an isolated todo-mode test environment." |
| 47 | `(let* ((todo-test-home (make-temp-file "todo-test-home-")) | 47 | `(let* ((todo-test-home (make-temp-file "todo-test-home-" t)) |
| 48 | (process-environment (cons (format "HOME=%s" todo-test-home) | 48 | (process-environment (cons (format "HOME=%s" todo-test-home) |
| 49 | process-environment)) | 49 | process-environment)) |
| 50 | (todo-directory todo-test-data-dir) | 50 | (todo-directory todo-test-data-dir) |
| 51 | (todo-default-todo-file (todo-short-file-name | 51 | (todo-default-todo-file (todo-short-file-name |
| 52 | (car (funcall todo-files-function))))) | 52 | (car (funcall todo-files-function))))) |
| 53 | ,@body)) | 53 | (unwind-protect |
| 54 | (progn ,@body) | ||
| 55 | (delete-directory todo-test-home t)))) | ||
| 54 | 56 | ||
| 55 | ;; (defun todo-test-show (num &optional archive) | 57 | ;; (defun todo-test-show (num &optional archive) |
| 56 | ;; "Display category NUM of test todo file. | 58 | ;; "Display category NUM of test todo file. |