This commit updates _all_ WASI test programs to use the latest version of the `wasi` crate (`v0.9.0`). While at it, it also unifies asserting error conditions across all test programs.
14 lines
337 B
Rust
14 lines
337 B
Rust
use wasi_tests::{STDERR_FD, STDIN_FD, STDOUT_FD};
|
|
|
|
unsafe fn test_stdio() {
|
|
for fd in &[STDIN_FD, STDOUT_FD, STDERR_FD] {
|
|
wasi::fd_fdstat_get(*fd).expect("fd_fdstat_get on stdio");
|
|
wasi::fd_renumber(*fd, *fd + 100).expect("renumbering stdio");
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
// Run the tests.
|
|
unsafe { test_stdio() }
|
|
}
|