File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,10 @@ mod tests {
187187 #[ test]
188188 fn prepend_unique_path ( ) {
189189 let mut vars = HashMap :: new ( ) ;
190- vars. env ( "PATH" , "/home/a/.cargo/bin:/home/b/.cargo/bin" ) ;
190+ vars. env (
191+ "PATH" ,
192+ env:: join_paths ( vec ! [ "/home/a/.cargo/bin" , "/home/b/.cargo/bin" ] . iter ( ) ) . unwrap ( ) ,
193+ ) ;
191194 let tp = Box :: new ( currentprocess:: TestProcess {
192195 vars,
193196 ..Default :: default ( )
@@ -216,9 +219,17 @@ mod tests {
216219 envs,
217220 & [ (
218221 & OsString :: from( "PATH" ) ,
219- & Some ( OsString :: from(
220- "/home/a/.cargo/bin:/home/z/.cargo/bin:/home/b/.cargo/bin"
221- ) )
222+ & Some (
223+ env:: join_paths(
224+ vec![
225+ "/home/a/.cargo/bin" ,
226+ "/home/z/.cargo/bin" ,
227+ "/home/b/.cargo/bin"
228+ ]
229+ . iter( )
230+ )
231+ . unwrap( )
232+ )
222233 ) , ]
223234 ) ;
224235 } ) ;
You can’t perform that action at this time.
0 commit comments