aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2018-12-06 16:11:27 +0100
committerMichael Albinus2018-12-06 16:11:27 +0100
commit7d33c775b245dc011f56559a8a776728888d7246 (patch)
treeaccacfc9926248054c0bf322969797d46e396f90 /test
parent66b49fc1d522b8d2cce7e957a5c6e7a4f6c90e0f (diff)
downloademacs-7d33c775b245dc011f56559a8a776728888d7246.tar.gz
emacs-7d33c775b245dc011f56559a8a776728888d7246.zip
Add missing handler to tramp-rclone.el, improve robustness
* lisp/net/tramp-rclone.el (tramp-adb): Require. (tramp-rclone-file-name-handler-alist): Use `tramp-adb-handle-expand-file-name'. (tramp-rclone-flush-directory-cache): New defun, derived from `tramp-rclone-flush-mount'. (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-delete-directory) (tramp-rclone-handle-delete-file) (tramp-rclone-handle-make-directory): Use it. (tramp-rclone-handle-directory-files) (tramp-rclone-local-file-name): Use `tramp-compat-file-name-quoted-p', `tramp-compat-file-name-quote' and ´tramp-compat-file-name-unquote'. (tramp-rclone-handle-file-executable-p) (tramp-rclone-handle-file-readable-p): Cache result. (tramp-rclone-handle-file-name-all-completions) (tramp-rclone-mounted-p, tramp-rclone-remote-file-name) (tramp-rclone-maybe-open-connection): Rewrite. * test/lisp/net/tramp-tests.el (tramp--test-rclone-p): New defun. (tramp-test05-expand-file-name-relative) (tramp--test-special-characters): Use it.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 15a120704eb..1fcecb85ebe 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -1997,7 +1997,7 @@ handled properly. BODY shall not contain a timeout."
1997 (skip-unless (tramp--test-enabled)) 1997 (skip-unless (tramp--test-enabled))
1998 1998
1999 ;; These are the methods the test doesn't fail. 1999 ;; These are the methods the test doesn't fail.
2000 (when (or (tramp--test-adb-p) (tramp--test-gvfs-p) 2000 (when (or (tramp--test-adb-p) (tramp--test-gvfs-p) (tramp--test-rclone-p)
2001 (tramp-smb-file-name-p tramp-test-temporary-file-directory)) 2001 (tramp-smb-file-name-p tramp-test-temporary-file-directory))
2002 (setf (ert-test-expected-result-type 2002 (setf (ert-test-expected-result-type
2003 (ert-get-test 'tramp-test05-expand-file-name-relative)) 2003 (ert-get-test 'tramp-test05-expand-file-name-relative))
@@ -4551,6 +4551,11 @@ This does not support external Emacs calls."
4551 (string-equal 4551 (string-equal
4552 "nextcloud" (file-remote-p tramp-test-temporary-file-directory 'method))) 4552 "nextcloud" (file-remote-p tramp-test-temporary-file-directory 'method)))
4553 4553
4554(defun tramp--test-rclone-p ()
4555 "Check, whether the remote host is offered by rclone.
4556This requires restrictions of file name syntax."
4557 (tramp-rclone-file-name-p tramp-test-temporary-file-directory))
4558
4554(defun tramp--test-rsync-p () 4559(defun tramp--test-rsync-p ()
4555 "Check, whether the rsync method is used. 4560 "Check, whether the rsync method is used.
4556This does not support special file names." 4561This does not support special file names."
@@ -4755,7 +4760,9 @@ This requires restrictions of file name syntax."
4755 ;; expanded to <TAB>. 4760 ;; expanded to <TAB>.
4756 (let ((files 4761 (let ((files
4757 (list 4762 (list
4758 (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) 4763 (if (or (tramp--test-gvfs-p)
4764 (tramp--test-rclone-p)
4765 (tramp--test-windows-nt-or-smb-p))
4759 "foo bar baz" 4766 "foo bar baz"
4760 (if (or (tramp--test-adb-p) 4767 (if (or (tramp--test-adb-p)
4761 (tramp--test-docker-p) 4768 (tramp--test-docker-p)
@@ -4781,7 +4788,9 @@ This requires restrictions of file name syntax."
4781 (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) 4788 (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p))
4782 "!foo!bar!baz!" 4789 "!foo!bar!baz!"
4783 "!foo|bar!baz|") 4790 "!foo|bar!baz|")
4784 (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) 4791 (if (or (tramp--test-gvfs-p)
4792 (tramp--test-rclone-p)
4793 (tramp--test-windows-nt-or-smb-p))
4785 ";foo;bar;baz;" 4794 ";foo;bar;baz;"
4786 ":foo;bar:baz;") 4795 ":foo;bar:baz;")
4787 (unless (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p)) 4796 (unless (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p))