aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-archive-tests.el2
-rw-r--r--test/lisp/net/tramp-tests.el40
2 files changed, 15 insertions, 27 deletions
diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el
index 3229d2b6506..b3fc129ef08 100644
--- a/test/lisp/net/tramp-archive-tests.el
+++ b/test/lisp/net/tramp-archive-tests.el
@@ -60,7 +60,6 @@
60(setq password-cache-expiry nil 60(setq password-cache-expiry nil
61 tramp-cache-read-persistent-data t ;; For auth-sources. 61 tramp-cache-read-persistent-data t ;; For auth-sources.
62 tramp-copy-size-limit nil 62 tramp-copy-size-limit nil
63 tramp-message-show-message nil
64 tramp-persistency-file-name nil 63 tramp-persistency-file-name nil
65 tramp-verbose 0) 64 tramp-verbose 0)
66 65
@@ -971,4 +970,5 @@ If INTERACTIVE is non-nil, the tests are run interactively."
971 "^tramp-archive")) 970 "^tramp-archive"))
972 971
973(provide 'tramp-archive-tests) 972(provide 'tramp-archive-tests)
973
974;;; tramp-archive-tests.el ends here 974;;; tramp-archive-tests.el ends here
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 549fb70aa92..247f878d3c5 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -67,8 +67,6 @@
67(defvar tramp-remote-path) 67(defvar tramp-remote-path)
68(defvar tramp-remote-process-environment) 68(defvar tramp-remote-process-environment)
69 69
70;; Needed for Emacs 24.
71(defvar inhibit-message)
72;; Needed for Emacs 25. 70;; Needed for Emacs 25.
73(defvar connection-local-criteria-alist) 71(defvar connection-local-criteria-alist)
74(defvar connection-local-profile-alist) 72(defvar connection-local-profile-alist)
@@ -100,8 +98,8 @@
100 (add-to-list 98 (add-to-list
101 'tramp-default-host-alist 99 'tramp-default-host-alist
102 `("\\`mock\\'" nil ,(system-name))) 100 `("\\`mock\\'" nil ,(system-name)))
103 ;; Emacs' Makefile sets $HOME to a nonexistent value. Needed in 101 ;; Emacs's Makefile sets $HOME to a nonexistent value. Needed
104 ;; batch mode only, therefore. 102 ;; in batch mode only, therefore.
105 (unless (and (null noninteractive) (file-directory-p "~/")) 103 (unless (and (null noninteractive) (file-directory-p "~/"))
106 (setenv "HOME" temporary-file-directory)) 104 (setenv "HOME" temporary-file-directory))
107 (format "/mock::%s" temporary-file-directory))) 105 (format "/mock::%s" temporary-file-directory)))
@@ -112,7 +110,6 @@
112 remote-file-name-inhibit-cache nil 110 remote-file-name-inhibit-cache nil
113 tramp-cache-read-persistent-data t ;; For auth-sources. 111 tramp-cache-read-persistent-data t ;; For auth-sources.
114 tramp-copy-size-limit nil 112 tramp-copy-size-limit nil
115 tramp-message-show-message nil
116 tramp-persistency-file-name nil 113 tramp-persistency-file-name nil
117 tramp-verbose 0) 114 tramp-verbose 0)
118 115
@@ -177,7 +174,6 @@ Print the content of the Tramp connection and debug buffers, if
177properly. BODY shall not contain a timeout." 174properly. BODY shall not contain a timeout."
178 (declare (indent 1) (debug (natnump body))) 175 (declare (indent 1) (debug (natnump body)))
179 `(let ((tramp-verbose (max (or ,verbose 0) (or tramp-verbose 0))) 176 `(let ((tramp-verbose (max (or ,verbose 0) (or tramp-verbose 0)))
180 (tramp-message-show-message t)
181 (debug-ignored-errors 177 (debug-ignored-errors
182 (append 178 (append
183 '("^make-symbolic-link not supported$" 179 '("^make-symbolic-link not supported$"
@@ -2039,7 +2035,7 @@ properly. BODY shall not contain a timeout."
2039 "/method:host:/:/path//foo")) 2035 "/method:host:/:/path//foo"))
2040 2036
2041 ;; Forwhatever reasons, the following tests let Emacs crash for 2037 ;; Forwhatever reasons, the following tests let Emacs crash for
2042 ;; Emacs 24 and Emacs 25, occasionally. No idea what's up. 2038 ;; Emacs 25, occasionally. No idea what's up.
2043 (when (tramp--test-emacs26-p) 2039 (when (tramp--test-emacs26-p)
2044 (should 2040 (should
2045 (string-equal (substitute-in-file-name "/method:host://~foo") "/~foo")) 2041 (string-equal (substitute-in-file-name "/method:host://~foo") "/~foo"))
@@ -2238,7 +2234,7 @@ This checks also `file-name-as-directory', `file-name-directory',
2238 (should 2234 (should
2239 (string-equal 2235 (string-equal
2240 (file-name-as-directory file) 2236 (file-name-as-directory file)
2241 (if (tramp-completion-mode-p) 2237 (if non-essential
2242 file (concat file (if (tramp--test-ange-ftp-p) "/" "./"))))) 2238 file (concat file (if (tramp--test-ange-ftp-p) "/" "./")))))
2243 (should (string-equal (file-name-directory file) file)) 2239 (should (string-equal (file-name-directory file) file))
2244 (should (string-equal (file-name-nondirectory file) ""))))))) 2240 (should (string-equal (file-name-nondirectory file) "")))))))
@@ -2376,7 +2372,7 @@ This checks also `file-name-as-directory', `file-name-directory',
2376 ;; Check message. 2372 ;; Check message.
2377 ;; Macro `ert-with-message-capture' was introduced in Emacs 26.1. 2373 ;; Macro `ert-with-message-capture' was introduced in Emacs 26.1.
2378 (with-no-warnings (when (symbol-plist 'ert-with-message-capture) 2374 (with-no-warnings (when (symbol-plist 'ert-with-message-capture)
2379 (let ((tramp-message-show-message t)) 2375 (let (inhibit-message)
2380 (dolist 2376 (dolist
2381 (noninteractive (unless (tramp--test-ange-ftp-p) '(nil t))) 2377 (noninteractive (unless (tramp--test-ange-ftp-p) '(nil t)))
2382 (dolist (visit '(nil t "string" no-message)) 2378 (dolist (visit '(nil t "string" no-message))
@@ -4242,8 +4238,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4242 :tags '(:expensive-test) 4238 :tags '(:expensive-test)
4243 (skip-unless (tramp--test-enabled)) 4239 (skip-unless (tramp--test-enabled))
4244 (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) 4240 (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)))
4245 ;; `make-process' has been inserted in Emacs 25.1. It supports file 4241 ;; `make-process' supports file name handlers since Emacs 27.
4246 ;; name handlers since Emacs 27.
4247 (skip-unless (tramp--test-emacs27-p)) 4242 (skip-unless (tramp--test-emacs27-p))
4248 4243
4249 (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) 4244 (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
@@ -4965,13 +4960,9 @@ INPUT, if non-nil, is a string sent to the process."
4965 (error (ert-skip "`vc-create-repo' not supported"))) 4960 (error (ert-skip "`vc-create-repo' not supported")))
4966 ;; The structure of VC-FILESET is not documented. Let's 4961 ;; The structure of VC-FILESET is not documented. Let's
4967 ;; hope it won't change. 4962 ;; hope it won't change.
4968 (condition-case nil 4963 (vc-register
4969 (vc-register 4964 (list (car vc-handled-backends)
4970 (list (car vc-handled-backends) 4965 (list (file-name-nondirectory tmp-name2))))
4971 (list (file-name-nondirectory tmp-name2))))
4972 ;; `vc-register' has changed its arguments in Emacs
4973 ;; 25.1. Let's skip it for older Emacsen.
4974 (error (skip-unless (tramp--test-emacs25-p))))
4975 ;; vc-git uses an own process sentinel, Tramp's sentinel 4966 ;; vc-git uses an own process sentinel, Tramp's sentinel
4976 ;; for flushing the cache isn't used. 4967 ;; for flushing the cache isn't used.
4977 (dired-uncache (concat (file-remote-p default-directory) "/")) 4968 (dired-uncache (concat (file-remote-p default-directory) "/"))
@@ -5228,12 +5219,6 @@ INPUT, if non-nil, is a string sent to the process."
5228 (delete-directory tmp-file) 5219 (delete-directory tmp-file)
5229 (should-not (file-exists-p tmp-file)))) 5220 (should-not (file-exists-p tmp-file))))
5230 5221
5231(defun tramp--test-emacs25-p ()
5232 "Check for Emacs version >= 25.1.
5233Some semantics has been changed for there, w/o new functions or
5234variables, so we check the Emacs version directly."
5235 (>= emacs-major-version 25))
5236
5237(defun tramp--test-emacs26-p () 5222(defun tramp--test-emacs26-p ()
5238 "Check for Emacs version >= 26.1. 5223 "Check for Emacs version >= 26.1.
5239Some semantics has been changed for there, w/o new functions or 5224Some semantics has been changed for there, w/o new functions or
@@ -6162,12 +6147,14 @@ Since it unloads Tramp, it shall be the last test to run."
6162 (and (or (and (boundp x) (null (local-variable-if-set-p x))) 6147 (and (or (and (boundp x) (null (local-variable-if-set-p x)))
6163 (and (functionp x) (null (autoloadp (symbol-function x))))) 6148 (and (functionp x) (null (autoloadp (symbol-function x)))))
6164 (string-match "^tramp" (symbol-name x)) 6149 (string-match "^tramp" (symbol-name x))
6150 ;; `tramp-completion-mode' is autoloaded in Emacs < 28.1.
6151 (not (eq 'tramp-completion-mode x))
6165 (not (string-match "^tramp\\(-archive\\)?--?test" (symbol-name x))) 6152 (not (string-match "^tramp\\(-archive\\)?--?test" (symbol-name x)))
6166 (not (string-match "unload-hook$" (symbol-name x))) 6153 (not (string-match "unload-hook$" (symbol-name x)))
6167 (ert-fail (format "`%s' still bound" x))))) 6154 (ert-fail (format "`%s' still bound" x)))))
6168 ;; The defstruct `tramp-file-name' and all its internal functions 6155 ;; The defstruct `tramp-file-name' and all its internal functions
6169 ;; shall be purged. `cl--find-class' must be protected in Emacs 24. 6156 ;; shall be purged.
6170 (with-no-warnings (should-not (cl--find-class 'tramp-file-name))) 6157 (should-not (cl--find-class 'tramp-file-name))
6171 (mapatoms 6158 (mapatoms
6172 (lambda (x) 6159 (lambda (x)
6173 (and (functionp x) 6160 (and (functionp x)
@@ -6214,4 +6201,5 @@ If INTERACTIVE is non-nil, the tests are run interactively."
6214;; file name operation cannot run in the timer. Remove `:unstable' tag? 6201;; file name operation cannot run in the timer. Remove `:unstable' tag?
6215 6202
6216(provide 'tramp-tests) 6203(provide 'tramp-tests)
6204
6217;;; tramp-tests.el ends here 6205;;; tramp-tests.el ends here