diff --git a/test/automated/eshell.el b/test/automated/eshell.el index d5ebc567281..f9061ceb57c 100644 --- a/test/automated/eshell.el +++ b/test/automated/eshell.el @@ -60,7 +60,9 @@ "Like `eshell-command-result', but not using HOME." (let ((eshell-directory-name (make-temp-file "eshell" t)) (eshell-history-file-name nil)) - (eshell-command-result command))) + (unwind-protect + (eshell-command-result command) + (delete-directory eshell-directory-name t)))) ;;; Tests: