]> git.eshelyaron.com Git - emacs.git/commitdiff
Some adaptions to tramp-tests.el
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 30 Nov 2020 12:54:29 +0000 (13:54 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 30 Nov 2020 12:54:29 +0000 (13:54 +0100)
* test/lisp/net/tramp-tests.el (tramp-test-vec): Check for remote
`tramp-test-temporary-file-directory'.
(tramp-test11-copy-file, tramp-test12-rename-file):
Do not skip for tramp-gvfs.el.
(tramp--test-sh-p): Use `tramp-test-vec'.

test/lisp/net/tramp-tests.el

index eeb838be30b43699bbeb167a910eca99975db072..819a3dfecf53c34fa1e12f1ae135a8c88bd1c032 100644 (file)
   "Temporary directory for Tramp tests.")
 
 (defconst tramp-test-vec
-  (tramp-dissect-file-name tramp-test-temporary-file-directory)
+  (and (file-remote-p tramp-test-temporary-file-directory)
+       (tramp-dissect-file-name tramp-test-temporary-file-directory))
   "The used `tramp-file-name' structure.")
 
 (setq auth-source-save-behavior nil
@@ -2542,9 +2543,8 @@ This checks also `file-name-as-directory', `file-name-directory',
 
          ;; Copy file to directory.
          (unwind-protect
-             ;; FIXME: This fails on my QNAP server, see
-             ;; /share/Web/owncloud/data/owncloud.log
-             (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p))
+             ;; This doesn't work on FTP.
+             (unless (tramp--test-ange-ftp-p)
                (write-region "foo" nil source)
                (should (file-exists-p source))
                (make-directory target)
@@ -2568,9 +2568,8 @@ This checks also `file-name-as-directory', `file-name-directory',
 
          ;; Copy directory to existing directory.
          (unwind-protect
-             ;; FIXME: This fails on my QNAP server, see
-             ;; /share/Web/owncloud/data/owncloud.log
-             (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p))
+             ;; This doesn't work on FTP.
+             (unless (tramp--test-ange-ftp-p)
                (make-directory source)
                (should (file-directory-p source))
                (write-region "foo" nil (expand-file-name "foo" source))
@@ -2591,9 +2590,8 @@ This checks also `file-name-as-directory', `file-name-directory',
 
          ;; Copy directory/file to non-existing directory.
          (unwind-protect
-             ;; FIXME: This fails on my QNAP server, see
-             ;; /share/Web/owncloud/data/owncloud.log
-             (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p))
+             ;; This doesn't work on FTP.
+             (unless (tramp--test-ange-ftp-p)
                (make-directory source)
                (should (file-directory-p source))
                (write-region "foo" nil (expand-file-name "foo" source))
@@ -2686,9 +2684,8 @@ This checks also `file-name-as-directory', `file-name-directory',
 
          ;; Rename directory to existing directory.
          (unwind-protect
-             ;; FIXME: This fails on my QNAP server, see
-             ;; /share/Web/owncloud/data/owncloud.log
-             (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p))
+             ;; This doesn't work on FTP.
+             (unless (tramp--test-ange-ftp-p)
                (make-directory source)
                (should (file-directory-p source))
                (write-region "foo" nil (expand-file-name "foo" source))
@@ -2710,9 +2707,8 @@ This checks also `file-name-as-directory', `file-name-directory',
 
          ;; Rename directory/file to non-existing directory.
          (unwind-protect
-             ;; FIXME: This fails on my QNAP server, see
-             ;; /share/Web/owncloud/data/owncloud.log
-             (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p))
+             ;; This doesn't work on FTP.
+             (unless (tramp--test-ange-ftp-p)
                (make-directory source)
                (should (file-directory-p source))
                (write-region "foo" nil (expand-file-name "foo" source))
@@ -5711,8 +5707,7 @@ This does not support special file names."
 
 (defun tramp--test-sh-p ()
   "Check, whether the remote host runs a based method from tramp-sh.el."
-  (tramp-sh-file-name-handler-p
-   (tramp-dissect-file-name tramp-test-temporary-file-directory)))
+  (tramp-sh-file-name-handler-p tramp-test-vec))
 
 (defun tramp--test-share-p ()
   "Check, whether the method needs a share."