Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
doy committed Dec 3, 2023
1 parent 467c7dd commit 31d3a1f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ async fn test_cat_async() {
use tokio::io::AsyncWriteExt as _;

let mut pty = pty_process::Pty::new().unwrap();
let pts = pty.pts().unwrap();
pty.resize(pty_process::Size::new(24, 80)).unwrap();
let mut child = pty_process::Command::new("cat").spawn(&pts).unwrap();
let mut child = {
let pts = pty.pts().unwrap();
pty.resize(pty_process::Size::new(24, 80)).unwrap();
pty_process::Command::new("cat").spawn(&pts).unwrap()
};

let (pty_r, mut pty_w) = pty.split();

Expand All @@ -54,9 +56,11 @@ async fn test_yes_async() {
use tokio::io::AsyncReadExt as _;

let mut pty = pty_process::Pty::new().unwrap();
let pts = pty.pts().unwrap();
pty.resize(pty_process::Size::new(24, 80)).unwrap();
let mut child = pty_process::Command::new("yes").spawn(&pts).unwrap();
let mut child = {
let pts = pty.pts().unwrap();
pty.resize(pty_process::Size::new(24, 80)).unwrap();
pty_process::Command::new("yes").spawn(&pts).unwrap()
};

let mut buf = [0u8; 3];

Expand Down

0 comments on commit 31d3a1f

Please sign in to comment.