From: Michael Albinus Date: Sun, 5 Sep 2021 07:23:30 +0000 (+0200) Subject: Cleanup tramp-tests.el X-Git-Tag: emacs-28.0.90~1171 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e6f936eb4d28bf23eb367d4245a137284d5491ee;p=emacs.git 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. --- diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 9a9684dd736..27b37d4f191 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -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.