; Avoid process kill query during term tests
* test/lisp/term-tests.el (term-test-screen-from-input): Just unset the process query-on-exit flag to rather than trying to end the process before the end of test (which is generally unreliable).
This commit is contained in:
parent
6f495abd0d
commit
99251ab62e
1 changed files with 7 additions and 15 deletions
|
@ -42,21 +42,13 @@
|
||||||
;; control chunking, and we don't have to worry about wrestling
|
;; control chunking, and we don't have to worry about wrestling
|
||||||
;; with stty settings.
|
;; with stty settings.
|
||||||
(let ((proc (get-buffer-process (current-buffer))))
|
(let ((proc (get-buffer-process (current-buffer))))
|
||||||
(unwind-protect
|
;; Don't get stuck when we close the buffer.
|
||||||
(prog2 (if (consp input)
|
(set-process-query-on-exit-flag proc nil)
|
||||||
|
(if (consp input)
|
||||||
(mapc (lambda (input) (term-emulate-terminal proc input)) input)
|
(mapc (lambda (input) (term-emulate-terminal proc input)) input)
|
||||||
(term-emulate-terminal proc input))
|
(term-emulate-terminal proc input))
|
||||||
(if return-var (buffer-local-value return-var (current-buffer))
|
(if return-var (buffer-local-value return-var (current-buffer))
|
||||||
(buffer-substring-no-properties (point-min) (point-max)))
|
(buffer-substring-no-properties (point-min) (point-max))))))
|
||||||
;; End the process to avoid query on buffer kill.
|
|
||||||
(process-send-eof proc)
|
|
||||||
(accept-process-output proc))
|
|
||||||
;; Make extra sure we don't get stuck in case we hit some
|
|
||||||
;; error before sending eof.
|
|
||||||
(when (process-live-p proc)
|
|
||||||
(kill-process proc)
|
|
||||||
;; Let Emacs update process status.
|
|
||||||
(accept-process-output proc))))))
|
|
||||||
|
|
||||||
(ert-deftest term-simple-lines ()
|
(ert-deftest term-simple-lines ()
|
||||||
(let ((str "\
|
(let ((str "\
|
||||||
|
|
Loading…
Add table
Reference in a new issue