freertos-std 0.0.1

A Clone of the Rust Standard Library for FreeRTOS
1
2
3
4
5
6
7
8
9
10
use super::{FileDesc, IoSlice};
use crate::os::unix::io::FromRawFd;
use core::mem::ManuallyDrop;

#[test]
fn limit_vector_count() {
    let stdout = ManuallyDrop::new(unsafe { FileDesc::from_raw_fd(1) });
    let bufs = (0..1500).map(|_| IoSlice::new(&[])).collect::<Vec<_>>();
    assert!(stdout.write_vectored(&bufs).is_ok());
}