From 31dcc70e555482fee59df2d8aa1939360d8f8c69 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 30 Nov 2020 13:54:29 +0100 Subject: [PATCH] Some adaptions to tramp-tests.el * 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 | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index eeb838be30b..819a3dfecf5 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -113,7 +113,8 @@ "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." -- 2.39.5