diff options
Diffstat (limited to 'lisp/emacs-lisp/ert-x.el')
-rw-r--r-- | lisp/emacs-lisp/ert-x.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el index 752ac3bfdd4..ffeead4179d 100644 --- a/lisp/emacs-lisp/ert-x.el +++ b/lisp/emacs-lisp/ert-x.el @@ -445,7 +445,9 @@ See also `ert-with-temp-directory'." (or (macroexp-file-name) buffer-file-name))))) `(let* ((,temp-file (,(if directory 'file-name-as-directory 'identity) (make-temp-file ,prefix ,directory ,suffix ,text))) - (,name ,temp-file)) + (,name ,(if directory + `(file-name-as-directory ,temp-file) + temp-file))) (unwind-protect (progn ,@body) (ignore-errors |