Adapt tramp-test26-file-name-completion

* test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion):
Do not check for default method.
This commit is contained in:
Michael Albinus 2021-09-07 16:28:41 +02:00
parent b02c9bcceb
commit 31db28b1bb

View file

@ -4281,12 +4281,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
;; for completion. We must refill the cache.
(tramp-set-connection-property tramp-test-vec "property" nil)
(let ;; This is needed for the `simplified' syntax.
((method-marker
(if (zerop (length tramp-method-regexp))
"" tramp-default-method-marker))
;; This is needed for the `separate' syntax.
(prefix-format (substring tramp-prefix-format 1))
(let ;; This is needed for the `separate' syntax.
((prefix-format (substring tramp-prefix-format 1))
;; This is needed for the IPv6 host name syntax.
(ipv6-prefix
(and (string-match-p tramp-ipv6-regexp host)
@ -4302,22 +4298,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(concat prefix-format method tramp-postfix-method-format)
(file-name-all-completions
(concat prefix-format (substring method 0 1)) "/"))))
;; Complete host name for default method. With gvfs
;; based methods, host name will be determined as
;; host.local, so we omit the test.
(let ((tramp-default-method (or method tramp-default-method)))
(unless (or (zerop (length host))
(tramp--test-gvfs-p tramp-default-method))
(should
(member
(concat
prefix-format method-marker tramp-postfix-method-format
ipv6-prefix host ipv6-postfix tramp-postfix-host-format)
(file-name-all-completions
(concat
prefix-format method-marker tramp-postfix-method-format
ipv6-prefix (substring host 0 1))
"/")))))
;; Complete host name.
(unless (or (zerop (length method))
(zerop (length tramp-method-regexp))