aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJim Porter2022-02-02 18:26:50 -0800
committerLars Ingebrigtsen2022-02-03 20:02:24 +0100
commite3516ec28f9a3fc81bffcf2d64a0d9e883a0ff26 (patch)
tree0634cf1b3a0aef29083b31c956074e57f6a5d353 /test
parent3a388ab4a604f868ab2c1f9b3c63a7f7a3221f7f (diff)
downloademacs-e3516ec28f9a3fc81bffcf2d64a0d9e883a0ff26.tar.gz
emacs-e3516ec28f9a3fc81bffcf2d64a0d9e883a0ff26.zip
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.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/eshell/em-extpipe-tests.el12
-rw-r--r--test/lisp/eshell/eshell-tests-helpers.el2
-rw-r--r--test/lisp/eshell/eshell-tests.el14
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 0879ad5b0ca..a1d15fe73a4 100644
--- a/test/lisp/eshell/em-extpipe-tests.el
+++ b/test/lisp/eshell/em-extpipe-tests.el
@@ -28,14 +28,10 @@
28(require 'ert) 28(require 'ert)
29(require 'ert-x) 29(require 'ert-x)
30(require 'em-extpipe) 30(require 'em-extpipe)
31(eval-and-compile 31(require 'eshell-tests-helpers
32 (load (expand-file-name "eshell-tests-helpers" 32 (expand-file-name "eshell-tests-helpers"
33 (file-name-directory (or load-file-name 33 (file-name-directory (or load-file-name
34 default-directory))))) 34 default-directory))))
35
36(defvar eshell-history-file-name)
37(defvar eshell-test--max-subprocess-time)
38(declare-function eshell-command-result-p "eshell-tests-helpers")
39 35
40(defmacro em-extpipe-tests--deftest (name input &rest body) 36(defmacro em-extpipe-tests--deftest (name input &rest body)
41 (declare (indent 2)) 37 (declare (indent 2))
diff --git a/test/lisp/eshell/eshell-tests-helpers.el b/test/lisp/eshell/eshell-tests-helpers.el
index f3fbe90356a..33cdd60113a 100644
--- a/test/lisp/eshell/eshell-tests-helpers.el
+++ b/test/lisp/eshell/eshell-tests-helpers.el
@@ -30,6 +30,8 @@
30(require 'esh-mode) 30(require 'esh-mode)
31(require 'eshell) 31(require 'eshell)
32 32
33(defvar eshell-history-file-name nil)
34
33(defvar eshell-test--max-subprocess-time 5 35(defvar eshell-test--max-subprocess-time 5
34 "The maximum amount of time to wait for a subprocess to finish, in seconds. 36 "The maximum amount of time to wait for a subprocess to finish, in seconds.
35See `eshell-wait-for-subprocess'.") 37See `eshell-wait-for-subprocess'.")
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el
index 3b1bbe7188b..c5ca0a54852 100644
--- a/test/lisp/eshell/eshell-tests.el
+++ b/test/lisp/eshell/eshell-tests.el
@@ -29,16 +29,10 @@
29(require 'ert-x) 29(require 'ert-x)
30(require 'esh-mode) 30(require 'esh-mode)
31(require 'eshell) 31(require 'eshell)
32(eval-and-compile 32(require 'eshell-tests-helpers
33 (load (expand-file-name "eshell-tests-helpers" 33 (expand-file-name "eshell-tests-helpers"
34 (file-name-directory (or load-file-name 34 (file-name-directory (or load-file-name
35 default-directory))))) 35 default-directory))))
36
37(defvar eshell-history-file-name)
38(defvar eshell-test--max-subprocess-time)
39(declare-function eshell-insert-command "eshell-tests-helpers")
40(declare-function eshell-match-result "eshell-tests-helpers")
41(declare-function eshell-command-result-p "eshell-tests-helpers")
42 36
43;;; Tests: 37;;; Tests:
44 38