File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ impl TestContext {
123
123
fn path_patterns ( path : impl AsRef < Path > ) -> Vec < String > {
124
124
vec ! [
125
125
format!(
126
- // Remove the trailing `\` or `/` from directories for cross-platform filters
126
+ // Trim the trailing separator for cross-platform directories filters
127
127
r"{}\\?/?" ,
128
128
regex:: escape(
129
129
& path
@@ -135,11 +135,15 @@ impl TestContext {
135
135
. display( )
136
136
. to_string( ) ,
137
137
)
138
+ // Make seprators platform agnostic because on Windows we will display
139
+ // paths with Unix-style separators sometimes
140
+ . replace( r"\\" , r"(\\|\/)" )
138
141
) ,
139
142
// Include a non-canonicalized version
140
143
format!(
141
144
r"{}\\?/?" ,
142
145
regex:: escape( & path. as_ref( ) . normalized( ) . display( ) . to_string( ) )
146
+ . replace( r"\\" , r"(\\|\/)" )
143
147
) ,
144
148
]
145
149
}
You can’t perform that action at this time.
0 commit comments