emacs-diffs
[Top][All Lists]
Advanced

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

master 2c3c444: Adapt tramp-tests.el for macOS


From: Michael Albinus
Subject: master 2c3c444: Adapt tramp-tests.el for macOS
Date: Tue, 28 Sep 2021 09:47:09 -0400 (EDT)

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

    Adapt tramp-tests.el for macOS
    
    * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
    (tramp-test30-make-process): Adapt for macOS.
---
 test/lisp/net/tramp-tests.el | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 55396c5..9a1c9d6 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -4586,18 +4586,16 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
                  (while (< (- (point-max) (point-min))
                            (length "66\n6F\n6F\n0D\n0A\n"))
                    (while (accept-process-output proc 0 nil t))))
-                (if (tramp--test-macos-p)
-                  (tramp--test-message
-                   "process-connection-type %s\n%s"
-                     process-connection-type (pp-to-string (buffer-string)))
                (should
                 (string-match-p
-                 (if (memq process-connection-type '(nil pipe))
+                 (if (and (memq process-connection-type '(nil pipe))
+                           (not (tramp--test-macos-p)))
+                      ;; On macOS, there is always newline conversion.
                      ;; `telnet' converts \r to <CR><NUL> if `crlf'
                      ;; flag is FALSE.  See telnet(1) man page.
                      "66\n6F\n6F\n0D\\(\n00\\)?\n0A\n"
                    "66\n6F\n6F\n0A\\(\n00\\)?\n0A\n")
-                 (buffer-string)))))
+                 (buffer-string))))
 
            ;; Cleanup.
            (ignore-errors (delete-process proc)))))
@@ -4855,19 +4853,17 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
                    (while (< (- (point-max) (point-min))
                              (length "66\n6F\n6F\n0D\n0A\n"))
                      (while (accept-process-output proc 0 nil t))))
-                  (if (tramp--test-macos-p)
-                    (tramp--test-message
-                     "process-connection-type %s\n%s"
-                     process-connection-type (pp-to-string (buffer-string)))
                  (should
                   (string-match-p
-                   (if (memq (or connection-type process-connection-type)
-                             '(nil pipe))
+                   (if (and (memq (or connection-type process-connection-type)
+                                  '(nil pipe))
+                             (not (tramp--test-macos-p)))
+                        ;; On macOS, there is always newline conversion.
                        ;; `telnet' converts \r to <CR><NUL> if `crlf'
                        ;; flag is FALSE.  See telnet(1) man page.
                        "66\n6F\n6F\n0D\\(\n00\\)?\n0A\n"
                      "66\n6F\n6F\n0A\\(\n00\\)?\n0A\n")
-                   (buffer-string)))))
+                   (buffer-string))))
 
              ;; Cleanup.
              (ignore-errors (delete-process proc)))))))))



reply via email to

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