aboutsummaryrefslogtreecommitdiffstats
path: root/test/automated
diff options
context:
space:
mode:
Diffstat (limited to 'test/automated')
-rw-r--r--test/automated/eshell.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/automated/eshell.el b/test/automated/eshell.el
index a78c34e4f39..310e9b6dfde 100644
--- a/test/automated/eshell.el
+++ b/test/automated/eshell.el
@@ -30,12 +30,15 @@
30 30
31(defmacro with-temp-eshell (&rest body) 31(defmacro with-temp-eshell (&rest body)
32 "Evaluate BODY in a temporary Eshell buffer." 32 "Evaluate BODY in a temporary Eshell buffer."
33 `(let ((eshell-buffer (eshell t))) 33 `(let* ((eshell-directory-name (make-temp-file "eshell" t))
34 (eshell-history-file-name nil)
35 (eshell-buffer (eshell t)))
34 (unwind-protect 36 (unwind-protect
35 (with-current-buffer eshell-buffer 37 (with-current-buffer eshell-buffer
36 ,@body) 38 ,@body)
37 (let (kill-buffer-query-functions) 39 (let (kill-buffer-query-functions)
38 (kill-buffer eshell-buffer))))) 40 (kill-buffer eshell-buffer)
41 (delete-directory eshell-directory-name t)))))
39 42
40(defun eshell-insert-command (text &optional func) 43(defun eshell-insert-command (text &optional func)
41 "Insert a command at the end of the buffer." 44 "Insert a command at the end of the buffer."