emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ccd4e47 1/2: Adapt tramp-tests.el according to Bug#


From: Michael Albinus
Subject: [Emacs-diffs] master ccd4e47 1/2: Adapt tramp-tests.el according to Bug#30243
Date: Thu, 1 Feb 2018 09:50:40 -0500 (EST)

branch: master
commit ccd4e4796c55a3babb60c3ee3909111998289741
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    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.
---
 test/lisp/net/tramp-tests.el | 31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index d6c7d47..7a12d14 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',
   "Check `copy-file'."
   (skip-unless (tramp--test-enabled))
 
-  ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579.
-  (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p))
+  ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
+  (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p))
                      '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
@@ -2158,8 +2158,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
   "Check `rename-file'."
   (skip-unless (tramp--test-enabled))
 
-  ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579.
-  (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p))
+  ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
+  (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p))
                      '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (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'."
              ;; We must unquote it.
              (should
               (string-equal
-               (tramp-compat-file-name-unquote (file-truename tmp-name1))
+               (funcall
+                (if (tramp--test-emacs27-p)
+                    'tramp-compat-file-name-unquote 'identity)
+                (file-truename tmp-name1))
                (tramp-compat-file-name-unquote (file-truename tmp-name3))))))
 
        ;; Cleanup.
@@ -3143,8 +3146,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
   (skip-unless (tramp--test-enabled))
   (skip-unless (file-acl tramp-test-temporary-file-directory))
 
-  ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579.
-  (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p))
+  ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
+  (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p))
                      '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (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'."
    (not (equal (file-selinux-context tramp-test-temporary-file-directory)
               '(nil nil nil nil))))
 
-  ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579.
-  (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p))
+  ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
+  (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p))
                      '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (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
 variables, so we check the Emacs version directly."
   (>= emacs-major-version 26))
 
+(defun tramp--test-emacs27-p ()
+  "Check for Emacs version >= 27.1.
+Some semantics has been changed for there, w/o new functions or
+variables, so we check the Emacs version directly."
+  (>= emacs-major-version 27))
+
 (defun tramp--test-adb-p ()
   "Check, whether the remote host runs Android.
 This requires restrictions of file name syntax."
@@ -4296,8 +4305,8 @@ This requires restrictions of file name syntax."
 
 (defun tramp--test-check-files (&rest files)
   "Run a simple but comprehensive test over every file in FILES."
-  ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579.
-  (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p))
+  ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
+  (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs27-p))
                      '(nil t) '(nil)))
     ;; We must use `file-truename' for the temporary directory,
     ;; because it could be located on a symlinked directory.  This



reply via email to

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