generated from mattbrictson/gem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow use of interactive debugger when running tests in watch mode (#30)
Before, `mt --watch` would take full control of stdin to listen for keyboard commands. This prevented the use of an interactive debugger when a test is being executed. This PR changes the event loop implementation so that control of stdin is relinquished when running tests. This allows an interactive debugger to be used while tests are running. Specifically: - Move stdin reader (i.e. `$stdin.getc`) out of a background thread and into the main event loop. - `$stdin.getc` blocks until a character is typed. - When the file system listener background thread detects a change, raise an exception in the main event loop to break out of `$stdin.getc` and proceed to run the tests.
- Loading branch information
1 parent
cd9fab0
commit 0b3bb2d
Showing
2 changed files
with
44 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters