diff options
| author | Ralf Jung <post@ralfj.de> | 2025-04-10 08:40:22 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-04-10 08:40:22 +0200 |
| commit | 726e33f0e34b077334f1bd3f06f46dfa04ee65b1 (patch) | |
| tree | 1955e527474c639ea98e34f4018553490198d17c | |
| parent | f0fb21e93c08e4d7b7bd24d685bd104b939f4b56 (diff) | |
| download | rust-726e33f0e34b077334f1bd3f06f46dfa04ee65b1.tar.gz rust-726e33f0e34b077334f1bd3f06f46dfa04ee65b1.zip | |
path: add more Windows tests
| -rw-r--r-- | src/tools/miri/tests/pass/path.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/miri/tests/pass/path.rs b/src/tools/miri/tests/pass/path.rs index 299ee6cfe9d..dbca0ea611f 100644 --- a/src/tools/miri/tests/pass/path.rs +++ b/src/tools/miri/tests/pass/path.rs @@ -31,9 +31,14 @@ fn test_absolute() { assert_absolute_eq(r"\\?\PIPE\name", r"\\?\PIPE\name"); // Verbatim paths are always unchanged, no matter what. assert_absolute_eq(r"\\?\path.\to/file..", r"\\?\path.\to/file.."); - + // Trailing dot is removed here. assert_absolute_eq(r"C:\path..\to.\file.", r"C:\path..\to\file"); + // `..` is resolved here. + assert_absolute_eq(r"C:\path\to\..\file", r"C:\path\file"); + assert_absolute_eq(r"\\server\share\to\..\file", r"\\server\share\file"); + // Magic filename. assert_absolute_eq(r"COM1", r"\\.\COM1"); + assert_absolute_eq(r"C:\path\to\COM1", r"\\.\COM1"); } else { panic!("unsupported OS"); } |
