From 8368610ff5b384b6c4ff08414bf33be5c59ee703 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 4 May 2022 15:02:40 -0700 Subject: [PATCH] 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 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" -- 2.39.5