diff options
author | Glenn Morris <rgm@gnu.org> | 2019-07-30 21:42:34 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2019-07-30 21:42:34 -0700 |
commit | 1ac0cfa2642ac026e09a7555f000e895b49289d5 (patch) | |
tree | 952416b5746614ea4e961dca70a00162421de36f /test/src/process-tests.el | |
parent | 77fb84e6db96cbaa70e230f4881e4ede6e028f15 (diff) | |
parent | 8fbe46252f5f241d274b59c6b1aaecd3ee58cc6a (diff) | |
download | emacs-1ac0cfa2642ac026e09a7555f000e895b49289d5.tar.gz emacs-1ac0cfa2642ac026e09a7555f000e895b49289d5.tar.bz2 emacs-1ac0cfa2642ac026e09a7555f000e895b49289d5.zip |
Merge from origin/emacs-26
8fbe462 (origin/emacs-26) ; * doc/lispref/positions.texi (List Motion...
1d9efc0 Add index for "\( in strings" (Bug#25195)
304e96f Fix doc-string of 'fit-window-to-buffer' (Bug#36848)
d4c4987 Update view-mode docstring
d6ca1fc ; * lisp/term.el: Add missing / to esc seq commentary.
b3e2073 Fix subproc listening when setting filter to non-t (Bug#36591)
f671950 * etc/NEWS.25: Belatedly announce rcirc-reconnect-delay.
7f42277 Mention term.el's \032 dir tracking in commentary (Bug#19524)
16a529e Remove upload functionality of package-x from the elisp manual
78e6c2a * etc/AUTHORS: Update.
086a56e Clarify Gravatar docs
0592467 * doc/lispref/display.texi (Defining Faces): Say a face can't...
# Conflicts:
# doc/emacs/programs.texi
# etc/AUTHORS
# lisp/term.el
Diffstat (limited to 'test/src/process-tests.el')
-rw-r--r-- | test/src/process-tests.el | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/src/process-tests.el b/test/src/process-tests.el index b853f77946d..7745fccaf9d 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -144,6 +144,35 @@ (should (equal "hello stderr!\n" (mapconcat #'identity (nreverse stderr-output) ""))))) +(ert-deftest set-process-filter-t () + "Test setting process filter to t and back." ;; Bug#36591 + (with-temp-buffer + (let* ((print-level nil) + (print-length nil) + (proc (start-process + "test proc" (current-buffer) + (concat invocation-directory invocation-name) + "-Q" "--batch" "--eval" + (prin1-to-string + '(let (s) + (while (setq s (read-from-minibuffer "$ ")) + (princ s) + (princ "\n"))))))) + (set-process-query-on-exit-flag proc nil) + (send-string proc "one\n") + (should + (accept-process-output proc 1)) ; Read "one". + (should (equal (buffer-string) "$ one\n$ ")) + (set-process-filter proc t) ; Stop reading from proc. + (send-string proc "two\n") + (should-not + (accept-process-output proc 1)) ; Can't read "two" yet. + (should (equal (buffer-string) "$ one\n$ ")) + (set-process-filter proc nil) ; Resume reading from proc. + (should + (accept-process-output proc 1)) ; Read "two" from proc. + (should (equal (buffer-string) "$ one\n$ two\n$ "))))) + (ert-deftest start-process-should-not-modify-arguments () "`start-process' must not modify its arguments in-place." ;; See bug#21831. |