aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2018-12-23 09:48:05 +0100
committerMichael Albinus2018-12-23 09:48:05 +0100
commit3ea89acac24149a06746740785906f56c89eaf1f (patch)
tree9baed47f26038d78fde705165a2e5562a1e52a85 /test
parent072b4c679dfd5528e74849cad18246730a991933 (diff)
downloademacs-3ea89acac24149a06746740785906f56c89eaf1f.tar.gz
emacs-3ea89acac24149a06746740785906f56c89eaf1f.zip
Handle `make-process' in Tramp and ange-ftp
* doc/lispref/processes.texi (Asynchronous Processes): Explain, that not all file name handlers support `make-process'. * lisp/net/ange-ftp.el: * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): * lisp/net/tramp.el (tramp-file-name-for-operation): Add `make-process'. * lisp/vc/ediff-util.el: * src/process.c: * test/src/process-tests.el: Use "file name handler" consequently.
Diffstat (limited to 'test')
-rw-r--r--test/src/process-tests.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/src/process-tests.el b/test/src/process-tests.el
index af5bc737574..35890af4822 100644
--- a/test/src/process-tests.el
+++ b/test/src/process-tests.el
@@ -217,7 +217,7 @@
217 217
218(ert-deftest make-process/file-handler/found () 218(ert-deftest make-process/file-handler/found ()
219 "Check that the ‘:file-handler’ argument of ‘make-process’ 219 "Check that the ‘:file-handler’ argument of ‘make-process’
220works as expected if a file handler is found." 220works as expected if a file name handler is found."
221 (let ((file-handler-calls 0)) 221 (let ((file-handler-calls 0))
222 (cl-flet ((file-handler 222 (cl-flet ((file-handler
223 (&rest args) 223 (&rest args)
@@ -238,7 +238,7 @@ works as expected if a file handler is found."
238 238
239(ert-deftest make-process/file-handler/not-found () 239(ert-deftest make-process/file-handler/not-found ()
240 "Check that the ‘:file-handler’ argument of ‘make-process’ 240 "Check that the ‘:file-handler’ argument of ‘make-process’
241works as expected if no file handler is found." 241works as expected if no file name handler is found."
242 (let ((file-name-handler-alist ()) 242 (let ((file-name-handler-alist ())
243 (default-directory invocation-directory) 243 (default-directory invocation-directory)
244 (program (expand-file-name invocation-name invocation-directory))) 244 (program (expand-file-name invocation-name invocation-directory)))
@@ -248,7 +248,7 @@ works as expected if no file handler is found."
248 248
249(ert-deftest make-process/file-handler/disable () 249(ert-deftest make-process/file-handler/disable ()
250 "Check ‘make-process’ works as expected if it shouldn’t use the 250 "Check ‘make-process’ works as expected if it shouldn’t use the
251file handler." 251file name handler."
252 (let ((file-name-handler-alist (list (cons (rx bos "test-handler:") 252 (let ((file-name-handler-alist (list (cons (rx bos "test-handler:")
253 #'process-tests--file-handler))) 253 #'process-tests--file-handler)))
254 (default-directory "test-handler:/dir/") 254 (default-directory "test-handler:/dir/")
@@ -259,7 +259,7 @@ file handler."
259(defun process-tests--file-handler (operation &rest _args) 259(defun process-tests--file-handler (operation &rest _args)
260 (cl-ecase operation 260 (cl-ecase operation
261 (unhandled-file-name-directory "/") 261 (unhandled-file-name-directory "/")
262 (make-process (ert-fail "file handler called unexpectedly")))) 262 (make-process (ert-fail "file name handler called unexpectedly"))))
263 263
264(put #'process-tests--file-handler 'operations 264(put #'process-tests--file-handler 'operations
265 '(unhandled-file-name-directory make-process)) 265 '(unhandled-file-name-directory make-process))