diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/net/tramp-tests.el | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index af4f45d6913..9f0264abc1b 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -2083,7 +2083,7 @@ Also see `ignore'." "/method:host:/:/path//foo")) ;; Forwhatever reasons, the following tests let Emacs crash for - ;; Emacs 25, occasionally. No idea what's up. + ;; Emacs 25, occasionally. No idea what's up. (when (tramp--test-emacs26-p) (should (string-equal @@ -4464,7 +4464,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (should (string-equal (format "%s\n" fnnd) (buffer-string))) (should-not (get-buffer-window (current-buffer) t)) - ;; Second run. The output must be appended. + ;; Second run. The output must be appended. (goto-char (point-max)) (should (zerop (process-file "ls" nil t t fnnd))) ;; `ls' could produce colorized output. @@ -4588,8 +4588,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (should (string-match-p (if (memq process-connection-type '(nil pipe)) - "66\n6F\n6F\n0D\n0A\n" - "66\n6F\n6F\n0A\n0A\n") + ;; `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)))) ;; Cleanup. @@ -4754,8 +4756,9 @@ If UNSTABLE is non-nil, the test is tagged as `:unstable'." ;; Cleanup. (ignore-errors (delete-process proc))) - ;; Process with stderr buffer. - (unless (tramp-direct-async-process-p) + ;; Process with stderr buffer. `telnet' does not cooperate with + ;; three processes. + (unless (or (tramp--test-telnet-p) (tramp-direct-async-process-p)) (let ((stderr (generate-new-buffer "*stderr*"))) (unwind-protect (with-temp-buffer @@ -4851,8 +4854,10 @@ If UNSTABLE is non-nil, the test is tagged as `:unstable'." (string-match-p (if (memq (or connection-type process-connection-type) '(nil pipe)) - "66\n6F\n6F\n0D\n0A\n" - "66\n6F\n6F\n0A\n0A\n") + ;; `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)))) ;; Cleanup. @@ -5498,9 +5503,9 @@ Use direct async.") ;; Ignore trailing newline. (setq path (substring (shell-command-to-string "echo $PATH") nil -1)) ;; The shell doesn't handle such long strings. - (unless (<= (length path) - (tramp-get-connection-property - tramp-test-vec "pipe-buf" 4096)) + (when (<= (length path) + (tramp-get-connection-property + tramp-test-vec "pipe-buf" 4096)) ;; The last element of `exec-path' is `exec-directory'. (should (string-equal @@ -6154,6 +6159,12 @@ This requires restrictions of file name syntax." "Check, whether the sudoedit method is used." (tramp-sudoedit-file-name-p tramp-test-temporary-file-directory)) +(defun tramp--test-telnet-p () + "Check, whether the telnet method is used. +This does not support special file names." + (string-equal + "telnet" (file-remote-p tramp-test-temporary-file-directory 'method))) + (defun tramp--test-windows-nt-p () "Check, whether the locale host runs MS Windows." (eq system-type 'windows-nt)) @@ -6712,6 +6723,7 @@ process sentinels. They shall not disturb each other." (tramp--test-sh-p))) (skip-unless (not (tramp--test-crypt-p))) (skip-unless (not (tramp--test-docker-p))) + (skip-unless (not (tramp--test-telnet-p))) (skip-unless (not (tramp--test-windows-nt-p))) (with-timeout |