aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Tromey2012-08-15 13:19:48 -0600
committerTom Tromey2012-08-15 13:19:48 -0600
commitc26c68374458681aff122267af06d75e551bc474 (patch)
tree311840f3637a33280f519bf5220e707d8b33b9bb
parent6c0d5ae50789673f53c834084bbe1f62f5a62731 (diff)
downloademacs-c26c68374458681aff122267af06d75e551bc474.tar.gz
emacs-c26c68374458681aff122267af06d75e551bc474.zip
add test case for I/O switching
-rw-r--r--test/automated/threads.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/automated/threads.el b/test/automated/threads.el
index b09e269b0d7..4c1afbdde67 100644
--- a/test/automated/threads.el
+++ b/test/automated/threads.el
@@ -162,4 +162,17 @@
162 (thread-join thr)) 162 (thread-join thr))
163 t))) 163 t)))
164 164
165(defun threads-test-io-switch ()
166 (setq threads-test-global 23))
167
168(ert-deftest threads-io-switch ()
169 "test that accept-process-output causes thread switch"
170 (should
171 (progn
172 (setq threads-test-global nil)
173 (make-thread #'threads-test-io-switch)
174 (while (not threads-test-global)
175 (accept-process-output nil 1))
176 threads-test-global)))
177
165;;; threads.el ends here 178;;; threads.el ends here