aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ChangeLog5
-rw-r--r--test/automated/eshell.el7
2 files changed, 10 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 0587373144a..de1676341e5 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
12013-09-13 Glenn Morris <rgm@gnu.org>
2
3 * automated/eshell.el (with-temp-eshell):
4 Use a temp directory for eshell-directory-name.
5
12013-09-12 Glenn Morris <rgm@gnu.org> 62013-09-12 Glenn Morris <rgm@gnu.org>
2 7
3 * automated/eshell.el (with-temp-eshell): Avoid hangs in batch mode 8 * automated/eshell.el (with-temp-eshell): Avoid hangs in batch mode
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."