diff options
Diffstat (limited to 'test/sys/test_termios.rs')
-rw-r--r-- | test/sys/test_termios.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/sys/test_termios.rs b/test/sys/test_termios.rs index 0a2d1855..308cf62c 100644 --- a/test/sys/test_termios.rs +++ b/test/sys/test_termios.rs @@ -3,7 +3,7 @@ use std::os::unix::prelude::*; use nix::{Error, fcntl, unistd}; use nix::errno::Errno; use nix::pty::openpty; -use nix::sys::termios::{self, ECHO, OPOST, OCRNL, tcgetattr}; +use nix::sys::termios::{self, ECHO, OPOST, OCRNL, Termios, tcgetattr}; use nix::unistd::{read, write, close}; /// Helper function analogous to std::io::Write::write_all, but for `RawFd`s @@ -104,3 +104,9 @@ fn test_local_flags() { let read = read(pty.master, &mut buf).unwrap_err(); assert_eq!(read, Error::Sys(Errno::EAGAIN)); } + +#[test] +fn test_cfmakeraw() { + let mut termios = unsafe { Termios::default_uninit() }; + termios::cfmakeraw(&mut termios); +} |