emacs-diffs
[Top][All Lists]
Advanced

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

master e3516ec28f 3/3: Use 'require' to load eshell-tests-helpers


From: Lars Ingebrigtsen
Subject: master e3516ec28f 3/3: Use 'require' to load eshell-tests-helpers
Date: Thu, 3 Feb 2022 14:03:52 -0500 (EST)

branch: master
commit e3516ec28f9a3fc81bffcf2d64a0d9e883a0ff26
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Use 'require' to load eshell-tests-helpers
    
    * test/lisp/eshell/eshell-tests.el
    * test/lisp/eshell/em-extpipe-tests.el: Load eshell-tests-helpers with
    'require'.
    
    * test/lisp/eshell/eshell-tests-helpers.el (eshell-history-file-name):
    Define this here so individual test files don't have to.
---
 test/lisp/eshell/em-extpipe-tests.el     | 12 ++++--------
 test/lisp/eshell/eshell-tests-helpers.el |  2 ++
 test/lisp/eshell/eshell-tests.el         | 14 ++++----------
 3 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/test/lisp/eshell/em-extpipe-tests.el 
b/test/lisp/eshell/em-extpipe-tests.el
index 0879ad5b0c..a1d15fe73a 100644
--- a/test/lisp/eshell/em-extpipe-tests.el
+++ b/test/lisp/eshell/em-extpipe-tests.el
@@ -28,14 +28,10 @@
 (require 'ert)
 (require 'ert-x)
 (require 'em-extpipe)
-(eval-and-compile
-  (load (expand-file-name "eshell-tests-helpers"
-                          (file-name-directory (or load-file-name
-                                                   default-directory)))))
-
-(defvar eshell-history-file-name)
-(defvar eshell-test--max-subprocess-time)
-(declare-function eshell-command-result-p "eshell-tests-helpers")
+(require 'eshell-tests-helpers
+         (expand-file-name "eshell-tests-helpers"
+                           (file-name-directory (or load-file-name
+                                                    default-directory))))
 
 (defmacro em-extpipe-tests--deftest (name input &rest body)
   (declare (indent 2))
diff --git a/test/lisp/eshell/eshell-tests-helpers.el 
b/test/lisp/eshell/eshell-tests-helpers.el
index f3fbe90356..33cdd60113 100644
--- a/test/lisp/eshell/eshell-tests-helpers.el
+++ b/test/lisp/eshell/eshell-tests-helpers.el
@@ -30,6 +30,8 @@
 (require 'esh-mode)
 (require 'eshell)
 
+(defvar eshell-history-file-name nil)
+
 (defvar eshell-test--max-subprocess-time 5
   "The maximum amount of time to wait for a subprocess to finish, in seconds.
 See `eshell-wait-for-subprocess'.")
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el
index 3b1bbe7188..c5ca0a5485 100644
--- a/test/lisp/eshell/eshell-tests.el
+++ b/test/lisp/eshell/eshell-tests.el
@@ -29,16 +29,10 @@
 (require 'ert-x)
 (require 'esh-mode)
 (require 'eshell)
-(eval-and-compile
-  (load (expand-file-name "eshell-tests-helpers"
-                          (file-name-directory (or load-file-name
-                                                   default-directory)))))
-
-(defvar eshell-history-file-name)
-(defvar eshell-test--max-subprocess-time)
-(declare-function eshell-insert-command "eshell-tests-helpers")
-(declare-function eshell-match-result "eshell-tests-helpers")
-(declare-function eshell-command-result-p "eshell-tests-helpers")
+(require 'eshell-tests-helpers
+         (expand-file-name "eshell-tests-helpers"
+                           (file-name-directory (or load-file-name
+                                                    default-directory))))
 
 ;;; Tests:
 



reply via email to

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