diff options
| author | Michael Albinus | 2020-11-30 13:54:29 +0100 |
|---|---|---|
| committer | Michael Albinus | 2020-11-30 13:54:29 +0100 |
| commit | 31dcc70e555482fee59df2d8aa1939360d8f8c69 (patch) | |
| tree | 202c7630d2aecbe60532702f48ac2ef26bea99ba | |
| parent | 84a4dd13587ca1704c669900b8143be0b87e2364 (diff) | |
| download | emacs-31dcc70e555482fee59df2d8aa1939360d8f8c69.tar.gz emacs-31dcc70e555482fee59df2d8aa1939360d8f8c69.zip | |
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'.
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 31 |
1 files 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 @@ | |||
| 113 | "Temporary directory for Tramp tests.") | 113 | "Temporary directory for Tramp tests.") |
| 114 | 114 | ||
| 115 | (defconst tramp-test-vec | 115 | (defconst tramp-test-vec |
| 116 | (tramp-dissect-file-name tramp-test-temporary-file-directory) | 116 | (and (file-remote-p tramp-test-temporary-file-directory) |
| 117 | (tramp-dissect-file-name tramp-test-temporary-file-directory)) | ||
| 117 | "The used `tramp-file-name' structure.") | 118 | "The used `tramp-file-name' structure.") |
| 118 | 119 | ||
| 119 | (setq auth-source-save-behavior nil | 120 | (setq auth-source-save-behavior nil |
| @@ -2542,9 +2543,8 @@ This checks also `file-name-as-directory', `file-name-directory', | |||
| 2542 | 2543 | ||
| 2543 | ;; Copy file to directory. | 2544 | ;; Copy file to directory. |
| 2544 | (unwind-protect | 2545 | (unwind-protect |
| 2545 | ;; FIXME: This fails on my QNAP server, see | 2546 | ;; This doesn't work on FTP. |
| 2546 | ;; /share/Web/owncloud/data/owncloud.log | 2547 | (unless (tramp--test-ange-ftp-p) |
| 2547 | (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p)) | ||
| 2548 | (write-region "foo" nil source) | 2548 | (write-region "foo" nil source) |
| 2549 | (should (file-exists-p source)) | 2549 | (should (file-exists-p source)) |
| 2550 | (make-directory target) | 2550 | (make-directory target) |
| @@ -2568,9 +2568,8 @@ This checks also `file-name-as-directory', `file-name-directory', | |||
| 2568 | 2568 | ||
| 2569 | ;; Copy directory to existing directory. | 2569 | ;; Copy directory to existing directory. |
| 2570 | (unwind-protect | 2570 | (unwind-protect |
| 2571 | ;; FIXME: This fails on my QNAP server, see | 2571 | ;; This doesn't work on FTP. |
| 2572 | ;; /share/Web/owncloud/data/owncloud.log | 2572 | (unless (tramp--test-ange-ftp-p) |
| 2573 | (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p)) | ||
| 2574 | (make-directory source) | 2573 | (make-directory source) |
| 2575 | (should (file-directory-p source)) | 2574 | (should (file-directory-p source)) |
| 2576 | (write-region "foo" nil (expand-file-name "foo" source)) | 2575 | (write-region "foo" nil (expand-file-name "foo" source)) |
| @@ -2591,9 +2590,8 @@ This checks also `file-name-as-directory', `file-name-directory', | |||
| 2591 | 2590 | ||
| 2592 | ;; Copy directory/file to non-existing directory. | 2591 | ;; Copy directory/file to non-existing directory. |
| 2593 | (unwind-protect | 2592 | (unwind-protect |
| 2594 | ;; FIXME: This fails on my QNAP server, see | 2593 | ;; This doesn't work on FTP. |
| 2595 | ;; /share/Web/owncloud/data/owncloud.log | 2594 | (unless (tramp--test-ange-ftp-p) |
| 2596 | (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p)) | ||
| 2597 | (make-directory source) | 2595 | (make-directory source) |
| 2598 | (should (file-directory-p source)) | 2596 | (should (file-directory-p source)) |
| 2599 | (write-region "foo" nil (expand-file-name "foo" source)) | 2597 | (write-region "foo" nil (expand-file-name "foo" source)) |
| @@ -2686,9 +2684,8 @@ This checks also `file-name-as-directory', `file-name-directory', | |||
| 2686 | 2684 | ||
| 2687 | ;; Rename directory to existing directory. | 2685 | ;; Rename directory to existing directory. |
| 2688 | (unwind-protect | 2686 | (unwind-protect |
| 2689 | ;; FIXME: This fails on my QNAP server, see | 2687 | ;; This doesn't work on FTP. |
| 2690 | ;; /share/Web/owncloud/data/owncloud.log | 2688 | (unless (tramp--test-ange-ftp-p) |
| 2691 | (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p)) | ||
| 2692 | (make-directory source) | 2689 | (make-directory source) |
| 2693 | (should (file-directory-p source)) | 2690 | (should (file-directory-p source)) |
| 2694 | (write-region "foo" nil (expand-file-name "foo" source)) | 2691 | (write-region "foo" nil (expand-file-name "foo" source)) |
| @@ -2710,9 +2707,8 @@ This checks also `file-name-as-directory', `file-name-directory', | |||
| 2710 | 2707 | ||
| 2711 | ;; Rename directory/file to non-existing directory. | 2708 | ;; Rename directory/file to non-existing directory. |
| 2712 | (unwind-protect | 2709 | (unwind-protect |
| 2713 | ;; FIXME: This fails on my QNAP server, see | 2710 | ;; This doesn't work on FTP. |
| 2714 | ;; /share/Web/owncloud/data/owncloud.log | 2711 | (unless (tramp--test-ange-ftp-p) |
| 2715 | (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p)) | ||
| 2716 | (make-directory source) | 2712 | (make-directory source) |
| 2717 | (should (file-directory-p source)) | 2713 | (should (file-directory-p source)) |
| 2718 | (write-region "foo" nil (expand-file-name "foo" source)) | 2714 | (write-region "foo" nil (expand-file-name "foo" source)) |
| @@ -5711,8 +5707,7 @@ This does not support special file names." | |||
| 5711 | 5707 | ||
| 5712 | (defun tramp--test-sh-p () | 5708 | (defun tramp--test-sh-p () |
| 5713 | "Check, whether the remote host runs a based method from tramp-sh.el." | 5709 | "Check, whether the remote host runs a based method from tramp-sh.el." |
| 5714 | (tramp-sh-file-name-handler-p | 5710 | (tramp-sh-file-name-handler-p tramp-test-vec)) |
| 5715 | (tramp-dissect-file-name tramp-test-temporary-file-directory))) | ||
| 5716 | 5711 | ||
| 5717 | (defun tramp--test-share-p () | 5712 | (defun tramp--test-share-p () |
| 5718 | "Check, whether the method needs a share." | 5713 | "Check, whether the method needs a share." |