Skip to content

Commit eaa59a3

Browse files
committed
Test other UNC-like prefixes besides \\?\
The test cases added in this commit are not very high value, since any `\` in what is supposed to be a component should be detected as invalid on Windows, which entails that these paths are detected as such. Adding these is mainly to clarify that the `\\?\` is not special here, comparedd to other kinds of `\` and `\\` paths.
1 parent f5ef10d commit eaa59a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gix-validate/tests/path/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,10 @@ mod component {
266266
Error::WindowsPathPrefix,
267267
ALL_OPTS
268268
);
269+
mktest!(unc_net_path, br"\\host", Error::PathSeparator, ALL_OPTS);
269270
mktest!(unc_path, br"\\?\pictures", Error::PathSeparator, ALL_OPTS);
271+
mktest!(unc_device_path, br"\\.\pictures", Error::PathSeparator, ALL_OPTS);
272+
mktest!(unc_nt_obj_path, br"\??\pictures", Error::PathSeparator, ALL_OPTS);
270273

271274
#[test]
272275
fn ntfs_gitmodules() {

0 commit comments

Comments
 (0)