diff options
author | bors <bors@rust-lang.org> | 2024-09-30 23:23:40 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2024-09-30 23:23:40 +0000 |
commit | c87004a1f5be671e3f03f69fb13d8915bdbb6a52 (patch) | |
tree | 2d86795a8614bdfb1d64a2f3281d61669dad0d5a /library/std/src/path/tests.rs | |
parent | fb4aebddd18d258046ddb51fd41589295259a0fa (diff) | |
parent | a0637597b4fd169118bc794363474ef4d5d06e1d (diff) |
Auto merge of #131078 - tgross35:rollup-66to2u9, r=tgross35
Rollup of 5 pull requests
Successful merges:
- #129638 (Hook up std::net to wasi-libc on wasm32-wasip2 target)
- #130877 (rustc_target: Add RISC-V atomic-related features)
- #130914 (Mark some more types as having insignificant dtor)
- #130961 (Enable `f16` tests on x86 Apple platforms)
- #130966 (make ptr metadata functions callable from stable const fn)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/path/tests.rs')
-rw-r--r-- | library/std/src/path/tests.rs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/library/std/src/path/tests.rs b/library/std/src/path/tests.rs index 6436872087d..b75793d2bc9 100644 --- a/library/std/src/path/tests.rs +++ b/library/std/src/path/tests.rs @@ -139,7 +139,7 @@ fn test_pathbuf_leak() { } #[test] -#[cfg(unix)] +#[cfg(any(unix, target_os = "wasi"))] pub fn test_decompositions_unix() { t!("", iter: [], @@ -1201,7 +1201,10 @@ pub fn test_push() { }); ); - if cfg!(unix) || cfg!(all(target_env = "sgx", target_vendor = "fortanix")) { + if cfg!(unix) + || cfg!(target_os = "wasi") + || cfg!(all(target_env = "sgx", target_vendor = "fortanix")) + { tp!("", "foo", "foo"); tp!("foo", "bar", "foo/bar"); tp!("foo/", "bar", "foo/bar"); @@ -1358,7 +1361,10 @@ pub fn test_set_file_name() { tfn!("foo", "bar", "bar"); tfn!("foo", "", ""); tfn!("", "foo", "foo"); - if cfg!(unix) || cfg!(all(target_env = "sgx", target_vendor = "fortanix")) { + if cfg!(unix) + || cfg!(target_os = "wasi") + || cfg!(all(target_env = "sgx", target_vendor = "fortanix")) + { tfn!(".", "foo", "./foo"); tfn!("foo/", "bar", "bar"); tfn!("foo/.", "bar", "bar"); @@ -1758,7 +1764,7 @@ fn test_components_debug() { assert_eq!(expected, actual); } -#[cfg(unix)] +#[cfg(any(unix, target_os = "wasi"))] #[test] fn test_iter_debug() { let path = Path::new("/tmp"); @@ -1859,7 +1865,7 @@ fn test_ord() { } #[test] -#[cfg(unix)] +#[cfg(any(unix, target_os = "wasi"))] fn test_unix_absolute() { use crate::path::absolute; |