From: Glenn Morris Date: Fri, 13 Sep 2013 03:55:56 +0000 (-0700) Subject: * test/automated/eshell.el (with-temp-eshell): Use a temp directory X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1654 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9dc7e8e1a4b04fe5ae98ca5df95f3a2bb1dfe0cf;p=emacs.git * test/automated/eshell.el (with-temp-eshell): Use a temp directory for eshell-directory-name. It seems we don't have permission to write to HOME on hydra. --- diff --git a/test/ChangeLog b/test/ChangeLog index 0587373144a..de1676341e5 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2013-09-13 Glenn Morris + + * automated/eshell.el (with-temp-eshell): + Use a temp directory for eshell-directory-name. + 2013-09-12 Glenn Morris * 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 @@ (defmacro with-temp-eshell (&rest body) "Evaluate BODY in a temporary Eshell buffer." - `(let ((eshell-buffer (eshell t))) + `(let* ((eshell-directory-name (make-temp-file "eshell" t)) + (eshell-history-file-name nil) + (eshell-buffer (eshell t))) (unwind-protect (with-current-buffer eshell-buffer ,@body) (let (kill-buffer-query-functions) - (kill-buffer eshell-buffer))))) + (kill-buffer eshell-buffer) + (delete-directory eshell-directory-name t))))) (defun eshell-insert-command (text &optional func) "Insert a command at the end of the buffer."