diff options
| author | Aram Drevekenin <aram@poor.dev> | 2020-11-14 13:27:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-14 13:27:42 +0100 |
| commit | 8e6dfded7ac1f0b04c2a0a4e6a5395613ae200eb (patch) | |
| tree | 7aafdad334a5e443831a6a77efdf36b4fdc6245d /src/tests | |
| parent | feat(development): add --debug flag (#41) (diff) | |
| download | sl0ppij-8e6dfded7ac1f0b04c2a0a4e6a5395613ae200eb.tar.gz sl0ppij-8e6dfded7ac1f0b04c2a0a4e6a5395613ae200eb.tar.xz sl0ppij-8e6dfded7ac1f0b04c2a0a4e6a5395613ae200eb.zip | |
fix(ux): properly echo characters and do not mess up exit (#44)
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/fakes.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tests/fakes.rs b/src/tests/fakes.rs index be43bde5..a9f34778 100644 --- a/src/tests/fakes.rs +++ b/src/tests/fakes.rs @@ -14,6 +14,7 @@ pub enum IoEvent { Kill(RawFd), SetTerminalSizeUsingFd(RawFd, u16, u16), IntoRawMode(RawFd), + UnsetRawMode(RawFd), TcDrain(RawFd), } @@ -123,6 +124,9 @@ impl OsApi for FakeInputOutput { fn into_raw_mode(&mut self, pid: RawFd) { self.io_events.lock().unwrap().push(IoEvent::IntoRawMode(pid)); } + fn unset_raw_mode(&mut self, pid: RawFd) { + self.io_events.lock().unwrap().push(IoEvent::UnsetRawMode(pid)); + } fn spawn_terminal(&mut self, _file_to_open: Option<PathBuf>) -> (RawFd, RawFd) { let next_terminal_id = { self.read_buffers.lock().unwrap().keys().len() as RawFd + 1 }; self.add_terminal(next_terminal_id); |
