1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Cleanup tramp-tests.el

* test/lisp/net/tramp-tests.el
(tramp--test--deftest-direct-async-process): Fix macro declaration.
(tramp-test29-start-file-process, tramp-test30-make-process):
Do not run connection type test for direct async processes.
This commit is contained in:
Michael Albinus 2021-09-05 09:23:30 +02:00
parent 76300b87d4
commit e6f936eb4d

View file

@ -4579,6 +4579,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
;; Process connection type.
(when (and (tramp--test-sh-p)
(not (tramp-direct-async-process-p))
;; `executable-find' has changed the number of
;; parameters in Emacs 27.1, so we use `apply' for
;; older Emacsen.
@ -4635,8 +4636,9 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
"Define ert test `TEST-direct-async' for direct async processes.
If UNSTABLE is non-nil, the test is tagged as `:unstable'."
(declare (indent 1))
;; `make-process' supports file name handlers since Emacs 27.
(when (let ((file-name-handler-alist '(("" . #'tramp--test-always))))
;; `make-process' supports file name handlers since Emacs 27. We
;; cannot use `tramp--test-always' during compilation of the macro.
(when (let ((file-name-handler-alist '(("" . (lambda (&rest _) t)))))
(ignore-errors (make-process :file-handler t)))
`(ert-deftest ,(intern (concat (symbol-name test) "-direct-async")) ()
,docstring
@ -4829,6 +4831,7 @@ If UNSTABLE is non-nil, the test is tagged as `:unstable'."
;; Process connection type.
(when (and (tramp--test-sh-p)
(not (tramp-direct-async-process-p))
;; `executable-find' has changed the number of
;; parameters in Emacs 27.1, so we use `apply' for
;; older Emacsen.