diff options
| author | Philipp Stephani | 2018-12-17 21:47:46 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2018-12-22 22:10:48 +0100 |
| commit | 039be4e02513e03ae465efae5694bd4e28a74dbe (patch) | |
| tree | 34d43f419b279e7f652ef592332f2021b5eedc66 /test/lisp | |
| parent | b41789f31f2355f6de8c15bbbc10cd6bf3dfe61e (diff) | |
| download | emacs-039be4e02513e03ae465efae5694bd4e28a74dbe.tar.gz 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')
| -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." | |||
| 1109 | (with-temp-buffer | 1109 | (with-temp-buffer |
| 1110 | (write-region nil nil nospecial nil :visit)))) | 1110 | (write-region nil nil nospecial nil :visit)))) |
| 1111 | 1111 | ||
| 1112 | (ert-deftest files-tests-file-name-non-special-make-process () | ||
| 1113 | "Check that the ‘:file-handler’ argument of ‘make-process’ | ||
| 1114 | works as expected if the default directory is quoted." | ||
| 1115 | (let ((default-directory (file-name-quote invocation-directory)) | ||
| 1116 | (program (file-name-quote | ||
| 1117 | (expand-file-name invocation-name invocation-directory)))) | ||
| 1118 | (should (processp (make-process :name "name" | ||
| 1119 | :command (list program "--version") | ||
| 1120 | :file-handler t))))) | ||
| 1121 | |||
| 1112 | (ert-deftest files-tests--insert-directory-wildcard-in-dir-p () | 1122 | (ert-deftest files-tests--insert-directory-wildcard-in-dir-p () |
| 1113 | (let ((alist (list (cons "/home/user/*/.txt" (cons "/home/user/" "*/.txt")) | 1123 | (let ((alist (list (cons "/home/user/*/.txt" (cons "/home/user/" "*/.txt")) |
| 1114 | (cons "/home/user/.txt" nil) | 1124 | (cons "/home/user/.txt" nil) |