You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was tinkering pty/tty stuff and still not clearly understand how it works :). And you're @philippkeller the most right person who I could address this question. Example below.
Currently this test will pass.
But why?
Why we get this echoed strings?
I've tested the flags.local_flags &= !termios::LocalFlags::ECHO works fine.
Thanks in advance.
#[test]/// Open cat, write string, read back string twice, send Ctrl^C and check that cat exitedfntest_no_cmd(){// wrapping into closure so I can use ?
|| -> std::io::Result<()>{let process = PtyProcess::new(Command::new("")).expect("could not execute cat");let f = process.get_file_handle();letmut writer = LineWriter::new(&f);letmut reader = BufReader::new(&f);
writer.write_all(b"hello cat\n")?;letmut buf = String::new();
reader.read_line(&mut buf)?;assert_eq!(buf,"hello cat\r\n");Ok(())}().unwrap_or_else(|e| panic!("test_cat failed: {}", e));}
The text was updated successfully, but these errors were encountered:
I was tinkering pty/tty stuff and still not clearly understand how it works :). And you're @philippkeller the most right person who I could address this question. Example below.
Currently this test will pass.
But why?
Why we get this echoed strings?
I've tested the
flags.local_flags &= !termios::LocalFlags::ECHO
works fine.Thanks in advance.
The text was updated successfully, but these errors were encountered: