]> git.eshelyaron.com Git - emacs.git/commitdiff
add test case for I/O switching
authorTom Tromey <tromey@redhat.com>
Wed, 15 Aug 2012 19:19:48 +0000 (13:19 -0600)
committerTom Tromey <tromey@redhat.com>
Wed, 15 Aug 2012 19:19:48 +0000 (13:19 -0600)
test/automated/threads.el

index b09e269b0d79136d52326af9726c1f1f2e157067..4c1afbdde67f84d779a0adc480ee5a22bd1bb404 100644 (file)
        (thread-join thr))
      t)))
 
+(defun threads-test-io-switch ()
+  (setq threads-test-global 23))
+
+(ert-deftest threads-io-switch ()
+  "test that accept-process-output causes thread switch"
+  (should
+   (progn
+     (setq threads-test-global nil)
+     (make-thread #'threads-test-io-switch)
+     (while (not threads-test-global)
+       (accept-process-output nil 1))
+     threads-test-global)))
+
 ;;; threads.el ends here