diff options
author | Philipp Stephani <p.stephani2@gmail.com> | 2018-12-17 21:47:46 +0100 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2018-12-22 22:10:48 +0100 |
commit | 039be4e02513e03ae465efae5694bd4e28a74dbe (patch) | |
tree | 34d43f419b279e7f652ef592332f2021b5eedc66 /test/lisp/files-tests.el | |
parent | b41789f31f2355f6de8c15bbbc10cd6bf3dfe61e (diff) | |
download | emacs-039be4e02513e03ae465efae5694bd4e28a74dbe.tar.gz emacs-039be4e02513e03ae465efae5694bd4e28a74dbe.tar.bz2 emacs-039be4e02513e03ae465efae5694bd4e28a74dbe.zip |
Add file name handler support for 'make-process' (Bug#28691)
* src/process.c (Fmake_process): Add new keyword argument
':file-handler'.
(syms_of_process) <make-process, :file-handler>: Define new symbols.
* lisp/files.el (file-name-non-special): Add support for
'make-process'.
* test/src/process-tests.el (make-process/file-handler/found)
(make-process/file-handler/not-found)
(make-process/file-handler/disable): New unit tests.
(process-tests--file-handler): New helper function.
* test/lisp/files-tests.el
(files-tests-file-name-non-special-make-process): New unit test.
* doc/lispref/files.texi (Magic File Names): Document that
'make-process' can invoke file name handlers.
* doc/lispref/processes.texi (Asynchronous Processes): Document
':file-handlers' argument to 'make-process'.
* etc/NEWS (Lisp Changes in Emacs 27.1): Mention new
:file-handler argument for 'make-process'.
Diffstat (limited to 'test/lisp/files-tests.el')
-rw-r--r-- | test/lisp/files-tests.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 3b192ee8727..9d827e865d9 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1109,6 +1109,16 @@ unquoted file names." (with-temp-buffer (write-region nil nil nospecial nil :visit)))) +(ert-deftest files-tests-file-name-non-special-make-process () + "Check that the ‘:file-handler’ argument of ‘make-process’ +works as expected if the default directory is quoted." + (let ((default-directory (file-name-quote invocation-directory)) + (program (file-name-quote + (expand-file-name invocation-name invocation-directory)))) + (should (processp (make-process :name "name" + :command (list program "--version") + :file-handler t))))) + (ert-deftest files-tests--insert-directory-wildcard-in-dir-p () (let ((alist (list (cons "/home/user/*/.txt" (cons "/home/user/" "*/.txt")) (cons "/home/user/.txt" nil) |