aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2018-02-01 15:49:18 +0100
committerMichael Albinus2018-02-01 15:49:18 +0100
commitccd4e4796c55a3babb60c3ee3909111998289741 (patch)
tree50e20267292ba686a2d13ca66bf01bc15c13ed5f
parentd42bd3a512dadd853d7fb828072a531d7f1d78b6 (diff)
downloademacs-ccd4e4796c55a3babb60c3ee3909111998289741.tar.gz
emacs-ccd4e4796c55a3babb60c3ee3909111998289741.zip
Adapt tramp-tests.el according to Bug#30243
* test/lisp/net/tramp-tests.el (tramp--test-emacs27-p): New defun. (tramp-test11-copy-file, tramp-test12-rename-file) (tramp-test21-file-links, tramp-test24-file-acl) (tramp-test25-file-selinux, tramp--test-check-files): Use it.
-rw-r--r--test/lisp/net/tramp-tests.el31
1 files changed, 20 insertions, 11 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index d6c7d478425..7a12d1468bf 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2047,8 +2047,8 @@ This checks also `file-name-as-directory', `file-name-directory',
2047 "Check `copy-file'." 2047 "Check `copy-file'."
2048 (skip-unless (tramp--test-enabled)) 2048 (skip-unless (tramp--test-enabled))
2049 2049
2050 ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579. 2050 ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
2051 (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p)) 2051 (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p))
2052 '(nil t) '(nil))) 2052 '(nil t) '(nil)))
2053 (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) 2053 (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
2054 (tmp-name2 (tramp--test-make-temp-name nil quoted)) 2054 (tmp-name2 (tramp--test-make-temp-name nil quoted))
@@ -2158,8 +2158,8 @@ This checks also `file-name-as-directory', `file-name-directory',
2158 "Check `rename-file'." 2158 "Check `rename-file'."
2159 (skip-unless (tramp--test-enabled)) 2159 (skip-unless (tramp--test-enabled))
2160 2160
2161 ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579. 2161 ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
2162 (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p)) 2162 (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p))
2163 '(nil t) '(nil))) 2163 '(nil t) '(nil)))
2164 (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) 2164 (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
2165 (tmp-name2 (tramp--test-make-temp-name nil quoted)) 2165 (tmp-name2 (tramp--test-make-temp-name nil quoted))
@@ -3011,7 +3011,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
3011 ;; We must unquote it. 3011 ;; We must unquote it.
3012 (should 3012 (should
3013 (string-equal 3013 (string-equal
3014 (tramp-compat-file-name-unquote (file-truename tmp-name1)) 3014 (funcall
3015 (if (tramp--test-emacs27-p)
3016 'tramp-compat-file-name-unquote 'identity)
3017 (file-truename tmp-name1))
3015 (tramp-compat-file-name-unquote (file-truename tmp-name3)))))) 3018 (tramp-compat-file-name-unquote (file-truename tmp-name3))))))
3016 3019
3017 ;; Cleanup. 3020 ;; Cleanup.
@@ -3143,8 +3146,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
3143 (skip-unless (tramp--test-enabled)) 3146 (skip-unless (tramp--test-enabled))
3144 (skip-unless (file-acl tramp-test-temporary-file-directory)) 3147 (skip-unless (file-acl tramp-test-temporary-file-directory))
3145 3148
3146 ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579. 3149 ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
3147 (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p)) 3150 (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p))
3148 '(nil t) '(nil))) 3151 '(nil t) '(nil)))
3149 (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) 3152 (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
3150 (tmp-name2 (tramp--test-make-temp-name nil quoted)) 3153 (tmp-name2 (tramp--test-make-temp-name nil quoted))
@@ -3221,8 +3224,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
3221 (not (equal (file-selinux-context tramp-test-temporary-file-directory) 3224 (not (equal (file-selinux-context tramp-test-temporary-file-directory)
3222 '(nil nil nil nil)))) 3225 '(nil nil nil nil))))
3223 3226
3224 ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579. 3227 ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
3225 (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p)) 3228 (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p))
3226 '(nil t) '(nil))) 3229 '(nil t) '(nil)))
3227 (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) 3230 (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
3228 (tmp-name2 (tramp--test-make-temp-name nil quoted)) 3231 (tmp-name2 (tramp--test-make-temp-name nil quoted))
@@ -4216,6 +4219,12 @@ Some semantics has been changed for there, w/o new functions or
4216variables, so we check the Emacs version directly." 4219variables, so we check the Emacs version directly."
4217 (>= emacs-major-version 26)) 4220 (>= emacs-major-version 26))
4218 4221
4222(defun tramp--test-emacs27-p ()
4223 "Check for Emacs version >= 27.1.
4224Some semantics has been changed for there, w/o new functions or
4225variables, so we check the Emacs version directly."
4226 (>= emacs-major-version 27))
4227
4219(defun tramp--test-adb-p () 4228(defun tramp--test-adb-p ()
4220 "Check, whether the remote host runs Android. 4229 "Check, whether the remote host runs Android.
4221This requires restrictions of file name syntax." 4230This requires restrictions of file name syntax."
@@ -4296,8 +4305,8 @@ This requires restrictions of file name syntax."
4296 4305
4297(defun tramp--test-check-files (&rest files) 4306(defun tramp--test-check-files (&rest files)
4298 "Run a simple but comprehensive test over every file in FILES." 4307 "Run a simple but comprehensive test over every file in FILES."
4299 ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579. 4308 ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
4300 (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p)) 4309 (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p))
4301 '(nil t) '(nil))) 4310 '(nil t) '(nil)))
4302 ;; We must use `file-truename' for the temporary directory, 4311 ;; We must use `file-truename' for the temporary directory,
4303 ;; because it could be located on a symlinked directory. This 4312 ;; because it could be located on a symlinked directory. This