diff options
| author | Chris Denton <christophersdenton@gmail.com> | 2022-03-05 18:14:34 +0000 |
|---|---|---|
| committer | Chris Denton <christophersdenton@gmail.com> | 2022-03-05 18:14:34 +0000 |
| commit | 27f6d2c7f6a608497f8737a6e3605df8c993ee22 (patch) | |
| tree | 46ebabfcceb3b6b89628e15ca3aaa8c4a2687def /library/std/src/path | |
| parent | 379e94f5a4aebe7dc2d8742653ca244d92b06f3d (diff) | |
| download | rust-27f6d2c7f6a608497f8737a6e3605df8c993ee22.tar.gz rust-27f6d2c7f6a608497f8737a6e3605df8c993ee22.zip | |
Relax tests for Windows dos device names
Windows 11 no longer turn paths ending with dos device names into device paths. E.g. `C:\path\to\COM1.txt` used to get turned into `\\.\COM1`. Whereas now the path is left as is.
Diffstat (limited to 'library/std/src/path')
| -rw-r--r-- | library/std/src/path/tests.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/library/std/src/path/tests.rs b/library/std/src/path/tests.rs index 8e51433094a..09a900b5bc0 100644 --- a/library/std/src/path/tests.rs +++ b/library/std/src/path/tests.rs @@ -1752,10 +1752,7 @@ fn test_windows_absolute() { unchanged!(r"\\?\path.\to/file.."); assert_eq!(absolute(r"C:\path..\to.\file.").unwrap(), Path::new(r"C:\path..\to\file")); - assert_eq!(absolute(r"C:\path\to\COM1").unwrap(), Path::new(r"\\.\COM1")); - assert_eq!(absolute(r"C:\path\to\COM1.txt").unwrap(), Path::new(r"\\.\COM1")); - assert_eq!(absolute(r"C:\path\to\COM1 .txt").unwrap(), Path::new(r"\\.\COM1")); - assert_eq!(absolute(r"C:\path\to\cOnOuT$").unwrap(), Path::new(r"\\.\cOnOuT$")); + assert_eq!(absolute(r"COM1").unwrap().as_os_str(), Path::new(r"\\.\COM1").as_os_str()); } #[bench] |
