emacs-diffs
[Top][All Lists]
Advanced

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

master 8368610ff5: Stop esh-var-tests leaving temp files behind


From: Glenn Morris
Subject: master 8368610ff5: Stop esh-var-tests leaving temp files behind
Date: Wed, 4 May 2022 18:03:05 -0400 (EDT)

branch: master
commit 8368610ff5b384b6c4ff08414bf33be5c59ee703
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    Stop esh-var-tests leaving temp files behind
    
    * test/lisp/eshell/esh-var-tests.el
    (esh-var-test/quoted-interp-temp-cmd): Don't leave temporary files.
---
 test/lisp/eshell/esh-var-tests.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/lisp/eshell/esh-var-tests.el 
b/test/lisp/eshell/esh-var-tests.el
index 3f3b591c5a..4e2a18861e 100644
--- a/test/lisp/eshell/esh-var-tests.el
+++ b/test/lisp/eshell/esh-var-tests.el
@@ -333,7 +333,12 @@ inside double-quotes"
 
 (ert-deftest esh-var-test/quoted-interp-temp-cmd ()
   "Interpolate command result redirected to temp file inside double-quotes"
-  (should (equal (eshell-test-command-result "cat \"$<echo hi>\"") "hi")))
+  (let ((temporary-file-directory
+         (file-name-as-directory (make-temp-file "esh-vars-tests" t))))
+    (unwind-protect
+        (should (equal (eshell-test-command-result "cat \"$<echo hi>\"")
+                       "hi"))
+      (delete-directory temporary-file-directory t))))
 
 (ert-deftest esh-var-test/quoted-interp-concat-cmd ()
   "Interpolate and concat command with literal"



reply via email to

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