aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNoam Postavsky2018-02-01 21:12:09 -0500
committerNoam Postavsky2018-02-02 18:08:50 -0500
commit99251ab62e8e2796a2ebc486afd7c0faf173a1b6 (patch)
treed816550404442fcf07c55d3d1f46bbb7d0390d65 /test
parent6f495abd0d65075714f92b0eb7f637d6f540edfa (diff)
downloademacs-99251ab62e8e2796a2ebc486afd7c0faf173a1b6.tar.gz
emacs-99251ab62e8e2796a2ebc486afd7c0faf173a1b6.zip
; 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.el22
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 @@
42 ;; control chunking, and we don't have to worry about wrestling 42 ;; control chunking, and we don't have to worry about wrestling
43 ;; with stty settings. 43 ;; with stty settings.
44 (let ((proc (get-buffer-process (current-buffer)))) 44 (let ((proc (get-buffer-process (current-buffer))))
45 (unwind-protect 45 ;; Don't get stuck when we close the buffer.
46 (prog2 (if (consp input) 46 (set-process-query-on-exit-flag proc nil)
47 (mapc (lambda (input) (term-emulate-terminal proc input)) input) 47 (if (consp input)
48 (term-emulate-terminal proc input)) 48 (mapc (lambda (input) (term-emulate-terminal proc input)) input)
49 (if return-var (buffer-local-value return-var (current-buffer)) 49 (term-emulate-terminal proc input))
50 (buffer-substring-no-properties (point-min) (point-max))) 50 (if return-var (buffer-local-value return-var (current-buffer))
51 ;; End the process to avoid query on buffer kill. 51 (buffer-substring-no-properties (point-min) (point-max))))))
52 (process-send-eof proc)
53 (accept-process-output proc))
54 ;; Make extra sure we don't get stuck in case we hit some
55 ;; error before sending eof.
56 (when (process-live-p proc)
57 (kill-process proc)
58 ;; Let Emacs update process status.
59 (accept-process-output proc))))))
60 52
61(ert-deftest term-simple-lines () 53(ert-deftest term-simple-lines ()
62 (let ((str "\ 54 (let ((str "\