aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-09-12 20:55:56 -0700
committerGlenn Morris2013-09-12 20:55:56 -0700
commit9dc7e8e1a4b04fe5ae98ca5df95f3a2bb1dfe0cf (patch)
tree1341d72524155bbf53772ad20b9d2ed32b2e1d71
parente3066edb0a69064af71f031cc034a94a7d345d6a (diff)
downloademacs-9dc7e8e1a4b04fe5ae98ca5df95f3a2bb1dfe0cf.tar.gz
emacs-9dc7e8e1a4b04fe5ae98ca5df95f3a2bb1dfe0cf.zip
* 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.
-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."