Sha256: c39e85391dc738db31ef5c7607956a97dc32cabdf09e5dc0bd4edd3a6e354aa3
Contents?: true
Size: 612 Bytes
Versions: 3
Compression:
Stored size: 612 Bytes
Contents
#![warn(rust_2018_idioms)] #![cfg(all(feature = "full", not(tokio_wasi)))] // WASI does not support all fs operations use tokio::fs; #[tokio::test] #[cfg(unix)] async fn canonicalize_root_dir_unix() { assert_eq!(fs::canonicalize("/.").await.unwrap().to_str().unwrap(), "/"); } #[tokio::test] #[cfg(windows)] async fn canonicalize_root_dir_windows() { // 2-step let bindings due to Rust memory semantics let dir_path = fs::canonicalize("C:\\.\\").await.unwrap(); let dir_name = dir_path.to_str().unwrap(); assert!(dir_name.starts_with("\\\\")); assert!(dir_name.ends_with("C:\\")); }
Version data entries
3 entries across 3 versions & 1 rubygems