Refactor parse_prefix on Windows
Refactor `get_first_two_components` to `get_next_component`. Fixes the following behaviour of `parse_prefix`: - series of separator bytes in a prefix are correctly parsed as a single separator - device namespace prefixes correctly recognize both `\\` and `/` as separators
This commit is contained in:
@@ -873,12 +873,12 @@ pub fn test_decompositions_windows() {
|
||||
);
|
||||
|
||||
t!("\\\\.\\foo/bar",
|
||||
iter: ["\\\\.\\foo/bar", "\\"],
|
||||
iter: ["\\\\.\\foo", "\\", "bar"],
|
||||
has_root: true,
|
||||
is_absolute: true,
|
||||
parent: None,
|
||||
file_name: None,
|
||||
file_stem: None,
|
||||
parent: Some("\\\\.\\foo/"),
|
||||
file_name: Some("bar"),
|
||||
file_stem: Some("bar"),
|
||||
extension: None
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user