blob: e260e4884135c9052fd6b3e549d1be398920ce53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// `is_read_write` is not yet implemented on Windows. And `ioctl_fionread`
// on Windows doesn't work on files.
#[cfg(not(windows))]
#[test]
fn test_ioctls() {
let file = std::fs::File::open("Cargo.toml").unwrap();
assert_eq!(rustix::io::is_read_write(&file).unwrap(), (true, false));
assert_eq!(
rustix::io::ioctl_fionread(&file).unwrap(),
file.metadata().unwrap().len()
);
}
|