emacs-diffs
[Top][All Lists]
Advanced

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

master e6f936e: Cleanup tramp-tests.el


From: Michael Albinus
Subject: master e6f936e: Cleanup tramp-tests.el
Date: Sun, 5 Sep 2021 03:23:38 -0400 (EDT)

branch: master
commit e6f936eb4d28bf23eb367d4245a137284d5491ee
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    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.
---
 test/lisp/net/tramp-tests.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 9a9684d..27b37d4 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.



reply via email to

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