aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorGlenn Morris2019-07-30 21:42:34 -0700
committerGlenn Morris2019-07-30 21:42:34 -0700
commit1ac0cfa2642ac026e09a7555f000e895b49289d5 (patch)
tree952416b5746614ea4e961dca70a00162421de36f /test/src
parent77fb84e6db96cbaa70e230f4881e4ede6e028f15 (diff)
parent8fbe46252f5f241d274b59c6b1aaecd3ee58cc6a (diff)
downloademacs-1ac0cfa2642ac026e09a7555f000e895b49289d5.tar.gz
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')
-rw-r--r--test/src/process-tests.el29
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 @@
144 (should (equal "hello stderr!\n" 144 (should (equal "hello stderr!\n"
145 (mapconcat #'identity (nreverse stderr-output) ""))))) 145 (mapconcat #'identity (nreverse stderr-output) "")))))
146 146
147(ert-deftest set-process-filter-t ()
148 "Test setting process filter to t and back." ;; Bug#36591
149 (with-temp-buffer
150 (let* ((print-level nil)
151 (print-length nil)
152 (proc (start-process
153 "test proc" (current-buffer)
154 (concat invocation-directory invocation-name)
155 "-Q" "--batch" "--eval"
156 (prin1-to-string
157 '(let (s)
158 (while (setq s (read-from-minibuffer "$ "))
159 (princ s)
160 (princ "\n")))))))
161 (set-process-query-on-exit-flag proc nil)
162 (send-string proc "one\n")
163 (should
164 (accept-process-output proc 1)) ; Read "one".
165 (should (equal (buffer-string) "$ one\n$ "))
166 (set-process-filter proc t) ; Stop reading from proc.
167 (send-string proc "two\n")
168 (should-not
169 (accept-process-output proc 1)) ; Can't read "two" yet.
170 (should (equal (buffer-string) "$ one\n$ "))
171 (set-process-filter proc nil) ; Resume reading from proc.
172 (should
173 (accept-process-output proc 1)) ; Read "two" from proc.
174 (should (equal (buffer-string) "$ one\n$ two\n$ ")))))
175
147(ert-deftest start-process-should-not-modify-arguments () 176(ert-deftest start-process-should-not-modify-arguments ()
148 "`start-process' must not modify its arguments in-place." 177 "`start-process' must not modify its arguments in-place."
149 ;; See bug#21831. 178 ;; See bug#21831.