diff options
| author | Michael Albinus | 2017-08-24 15:53:56 +0200 |
|---|---|---|
| committer | Michael Albinus | 2017-08-24 15:53:56 +0200 |
| commit | 0332a0ef2bbe6954f080cb6c9d3f0cc2517a1ab1 (patch) | |
| tree | dd5db1d8637ddc8ac9f4653d012dced23816bf68 /test | |
| parent | fa5e63e40412f6152dbe079a766845112d598479 (diff) | |
| download | emacs-0332a0ef2bbe6954f080cb6c9d3f0cc2517a1ab1.tar.gz emacs-0332a0ef2bbe6954f080cb6c9d3f0cc2517a1ab1.zip | |
Minor improvements for tramp-interrupt-process, documentation
* doc/lispref/processes.texi (Signals to Processes):
* etc/NEWS: Document interrupt-process-functions.
* lisp/net/tramp.el (tramp-interrupt-process): Test also for
`process-live-p'.
* src/process.c (Vinterrupt_process_functions): Fix docstring.
* test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
Extend test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 85ed6467220..55f4b52ccdf 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -2966,9 +2966,17 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 2966 | (with-temp-buffer | 2966 | (with-temp-buffer |
| 2967 | (setq proc (start-file-process "test" (current-buffer) "sleep" "10")) | 2967 | (setq proc (start-file-process "test" (current-buffer) "sleep" "10")) |
| 2968 | (should (processp proc)) | 2968 | (should (processp proc)) |
| 2969 | (should (process-live-p proc)) | ||
| 2969 | (should (equal (process-status proc) 'run)) | 2970 | (should (equal (process-status proc) 'run)) |
| 2970 | (interrupt-process proc) | 2971 | (should (interrupt-process proc)) |
| 2971 | (should (equal (process-status proc) 'signal))) | 2972 | ;; Let the process accept the interrupt. |
| 2973 | (accept-process-output proc 1 nil 0) | ||
| 2974 | (should-not (process-live-p proc)) | ||
| 2975 | (should (equal (process-status proc) 'signal)) | ||
| 2976 | ;; An interrupted process cannot be interrupted, again. | ||
| 2977 | ;; Does not work reliable. | ||
| 2978 | ;; (should-error (interrupt-process proc))) | ||
| 2979 | ) | ||
| 2972 | 2980 | ||
| 2973 | ;; Cleanup. | 2981 | ;; Cleanup. |
| 2974 | (ignore-errors (delete-process proc))))) | 2982 | (ignore-errors (delete-process proc))))) |