Skip to content

Commit

Permalink
refactor: work around the cfg
Browse files Browse the repository at this point in the history
Co-authored-by: Alice Ryhl <aliceryhl@google.com>
  • Loading branch information
koivunej and Darksonn committed Nov 21, 2022
1 parent 47c6e69 commit fca1ac6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests-integration/tests/process_stdio.rs
Expand Up @@ -199,6 +199,7 @@ async fn vectored_writes() {

let mut cat = cat().spawn().unwrap();
let mut stdin = cat.stdin.take().unwrap();
let are_writes_vectored = stdin.is_write_vectored();
let mut stdout = cat.stdout.take().unwrap();

let write = async {
Expand Down Expand Up @@ -236,8 +237,7 @@ async fn vectored_writes() {
// on unix our small payload should always fit in whatever default sized pipe with a single
// syscall. if multiple are used, then the forwarding does not work, or we are on a platform
// for which the `std` does not support vectored writes.
#[cfg(target_family = "unix")]
assert_eq!(writes_completed, 1);
assert_eq!(writes_completed == 1, are_writes_vectored);

assert_eq!(&read.unwrap(), b"hello\nworld!\n");
}

0 comments on commit fca1ac6

Please sign in to comment.