diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4566bd7..b725abd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,7 +69,7 @@ jobs: - run: > rustup target add wasm32-wasi - - run: cargo check --workspace --release -vv --target=wasm32-wasi + - run: cargo check --workspace --release -vv --target=wasm32-wasi --all-targets test: name: Test diff --git a/Cargo.toml b/Cargo.toml index e51dab8..e702b62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ include = ["src", "build.rs", "Cargo.toml", "COPYRIGHT", "LICENSE*", "/*.md"] io-lifetimes = "1.0.0" [target.'cfg(not(any(windows, target_os = "hermit", target_os = "unknown")))'.dependencies] -rustix = { version = "0.36.0", features = ["termios"] } +rustix = { version = "0.36.4", features = ["termios"] } [target.'cfg(target_os = "hermit")'.dependencies] hermit-abi = "0.2.0" @@ -33,5 +33,5 @@ features = [ [dev-dependencies] atty = "0.2.14" -[target.'cfg(unix)'.dev-dependencies] +[target.'cfg(any(unix, target_os = "wasi"))'.dev-dependencies] libc = "0.2.110" diff --git a/src/lib.rs b/src/lib.rs index 2ec2745..6e2c4a2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -256,6 +256,7 @@ impl IsTerminal for std::process::ChildStderr { #[cfg(test)] mod tests { + #[cfg(not(target_os = "unknown"))] use super::IsTerminal; #[test] @@ -286,7 +287,7 @@ mod tests { } #[test] - #[cfg(unix)] + #[cfg(any(unix, target_os = "wasi"))] fn stdin() { unsafe { assert_eq!( @@ -297,7 +298,7 @@ mod tests { } #[test] - #[cfg(unix)] + #[cfg(any(unix, target_os = "wasi"))] fn stdout() { unsafe { assert_eq!( @@ -308,7 +309,7 @@ mod tests { } #[test] - #[cfg(unix)] + #[cfg(any(unix, target_os = "wasi"))] fn stderr() { unsafe { assert_eq!( @@ -319,7 +320,7 @@ mod tests { } #[test] - #[cfg(unix)] + #[cfg(any(unix, target_os = "wasi"))] fn stdin_vs_libc() { unsafe { assert_eq!( @@ -330,7 +331,7 @@ mod tests { } #[test] - #[cfg(unix)] + #[cfg(any(unix, target_os = "wasi"))] fn stdout_vs_libc() { unsafe { assert_eq!( @@ -341,7 +342,7 @@ mod tests { } #[test] - #[cfg(unix)] + #[cfg(any(unix, target_os = "wasi"))] fn stderr_vs_libc() { unsafe { assert_eq!(