Keep stdout open in limit_vector_count test

This commit is contained in:
Tomasz Miąsko 2020-08-06 00:00:00 +00:00
parent c15bae53b5
commit 888bc07c6b

View File

@ -283,12 +283,12 @@ impl Drop for FileDesc {
#[cfg(test)]
mod tests {
use super::{FileDesc, IoSlice};
use core::mem::ManuallyDrop;
#[test]
fn limit_vector_count() {
let stdout = FileDesc { fd: 1 };
let stdout = ManuallyDrop::new(FileDesc { fd: 1 });
let bufs = (0..1500).map(|_| IoSlice::new(&[])).collect::<Vec<_>>();
assert!(stdout.write_vectored(&bufs).is_ok());
}
}