about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/std/src/path/tests.rs5
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]