diff options
author | Noam Postavsky <npostavs@gmail.com> | 2018-02-01 21:12:09 -0500 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2018-02-02 18:08:50 -0500 |
commit | 99251ab62e8e2796a2ebc486afd7c0faf173a1b6 (patch) | |
tree | d816550404442fcf07c55d3d1f46bbb7d0390d65 /test | |
parent | 6f495abd0d65075714f92b0eb7f637d6f540edfa (diff) | |
download | emacs-99251ab62e8e2796a2ebc486afd7c0faf173a1b6.tar.gz |
; 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).
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/term-tests.el | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/test/lisp/term-tests.el b/test/lisp/term-tests.el index 16466ea3cd4..234dfa1f0d5 100644 --- a/test/lisp/term-tests.el +++ b/test/lisp/term-tests.el @@ -42,21 +42,13 @@ ;; control chunking, and we don't have to worry about wrestling ;; with stty settings. (let ((proc (get-buffer-process (current-buffer)))) - (unwind-protect - (prog2 (if (consp input) - (mapc (lambda (input) (term-emulate-terminal proc input)) input) - (term-emulate-terminal proc input)) - (if return-var (buffer-local-value return-var (current-buffer)) - (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)))))) + ;; Don't get stuck when we close the buffer. + (set-process-query-on-exit-flag proc nil) + (if (consp input) + (mapc (lambda (input) (term-emulate-terminal proc input)) input) + (term-emulate-terminal proc input)) + (if return-var (buffer-local-value return-var (current-buffer)) + (buffer-substring-no-properties (point-min) (point-max)))))) (ert-deftest term-simple-lines () (let ((str "\ |