| 22 | |
| 23 | #[test] |
| 24 | fn test_termios_drain() { |
| 25 | use rustix::pty::*; |
| 26 | use rustix::termios::*; |
| 27 | |
| 28 | let pty = match openpt(OpenptFlags::empty()) { |
| 29 | Ok(pty) => pty, |
| 30 | Err(rustix::io::Errno::NOSYS) => return, |
| 31 | Err(err) => panic!("{:?}", err), |
| 32 | }; |
| 33 | let tio = match tcgetattr(&pty) { |
| 34 | Ok(tio) => tio, |
| 35 | Err(rustix::io::Errno::NOSYS) => return, |
| 36 | #[cfg(apple)] |
| 37 | Err(rustix::io::Errno::NOTTY) => return, |
| 38 | Err(err) => panic!("{:?}", err), |
| 39 | }; |
| 40 | tcsetattr(&pty, OptionalActions::Now, &tio).unwrap(); |
| 41 | |
| 42 | tcdrain(&pty).unwrap(); |
| 43 | } |
| 44 | |
| 45 | #[test] |
| 46 | fn test_termios_winsize() { |