File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,12 @@ mod tests {
54
54
fn start_with_drive_letter ( ) {
55
55
let mut parser = Statement :: new ( ) . unwrap ( ) ;
56
56
let result = parser. parse_and_execute ( "[path('C:\\ ','test')]" , & Context :: new ( ) ) . unwrap ( ) ;
57
+
58
+ #[ cfg( target_os = "windows" ) ]
57
59
assert_eq ! ( result, format!( "C:{SEPARATOR}test" ) ) ;
60
+
61
+ #[ cfg( not( target_os = "windows" ) ) ]
62
+ assert_eq ! ( result, format!( "C:\\ {SEPARATOR}test" ) ) ;
58
63
}
59
64
60
65
#[ test]
@@ -68,7 +73,7 @@ mod tests {
68
73
69
74
// non-Windows, the colon is a valid character in a path
70
75
#[ cfg( not( target_os = "windows" ) ) ]
71
- assert_eq ! ( result, format!( "a{SEPARATOR}C:{SEPARATOR}test" ) ) ;
76
+ assert_eq ! ( result, format!( "a{SEPARATOR}C:\\ {SEPARATOR}test" ) ) ;
72
77
}
73
78
74
79
#[ test]
@@ -82,7 +87,7 @@ mod tests {
82
87
83
88
// non-Windows, the colon is a valid character in a path
84
89
#[ cfg( not( target_os = "windows" ) ) ]
85
- assert_eq ! ( result, format!( "C:{SEPARATOR}D:{SEPARATOR}test" ) ) ;
90
+ assert_eq ! ( result, format!( "C:\\ {SEPARATOR}D:\\ {SEPARATOR}test" ) ) ;
86
91
}
87
92
88
93
#[ test]
You can’t perform that action at this time.
0 commit comments