From: Glenn Morris Date: Wed, 4 May 2022 22:02:40 +0000 (-0700) Subject: Stop esh-var-tests leaving temp files behind X-Git-Tag: emacs-29.0.90~1931^2~60 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8368610ff5b384b6c4ff08414bf33be5c59ee703;p=emacs.git 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. --- diff --git a/test/lisp/eshell/esh-var-tests.el b/test/lisp/eshell/esh-var-tests.el index 3f3b591c5ae..4e2a18861e5 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 \"$\"") "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 \"$\"") + "hi")) + (delete-directory temporary-file-directory t)))) (ert-deftest esh-var-test/quoted-interp-concat-cmd () "Interpolate and concat command with literal"