emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114255: * test/automated/eshell.el (with-temp-eshel


From: Glenn Morris
Subject: [Emacs-diffs] trunk r114255: * test/automated/eshell.el (with-temp-eshell): Use a temp directory
Date: Fri, 13 Sep 2013 03:56:02 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114255
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2013-09-12 20:55:56 -0700
message:
  * 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.
modified:
  test/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-8588
  test/automated/eshell.el       eshtest.el-20091113204419-o5vbwnq5f7feedwu-1875
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2013-09-12 20:42:40 +0000
+++ b/test/ChangeLog    2013-09-13 03:55:56 +0000
@@ -1,3 +1,8 @@
+2013-09-13  Glenn Morris  <address@hidden>
+
+       * automated/eshell.el (with-temp-eshell):
+       Use a temp directory for eshell-directory-name.
+
 2013-09-12  Glenn Morris  <address@hidden>
 
        * automated/eshell.el (with-temp-eshell): Avoid hangs in batch mode

=== modified file 'test/automated/eshell.el'
--- a/test/automated/eshell.el  2013-09-12 20:39:13 +0000
+++ b/test/automated/eshell.el  2013-09-13 03:55:56 +0000
@@ -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."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]