File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,10 +293,10 @@ mod tests {
293293 let path = expand_path ( "/absolute/path" ) ;
294294 assert_eq ! ( path, "/absolute/path" ) ;
295295
296- // Tilde expansion should work
296+ // Tilde expansion should work (cross-platform)
297297 let home_path = expand_path ( "~/test" ) ;
298- assert ! ( home_path. starts_with( '/' ) ) ;
299- assert ! ( home_path. ends_with ( "/ test") ) ;
298+ assert ! ( ! home_path. starts_with( '~' ) , "Tilde should be expanded" ) ;
299+ assert ! ( home_path. contains ( " test") ) ;
300300 }
301301
302302 #[ test]
Original file line number Diff line number Diff line change @@ -197,10 +197,10 @@ mod tests {
197197 let path = expand_path ( "/absolute/path" ) ;
198198 assert_eq ! ( path, "/absolute/path" ) ;
199199
200- // Tilde expansion should work
200+ // Tilde expansion should work (cross-platform)
201201 let home_path = expand_path ( "~/test" ) ;
202- assert ! ( home_path. starts_with( '/' ) ) ;
203- assert ! ( home_path. ends_with ( "/ test") ) ;
202+ assert ! ( ! home_path. starts_with( '~' ) , "Tilde should be expanded" ) ;
203+ assert ! ( home_path. contains ( " test") ) ;
204204 }
205205
206206 #[ test]
You can’t perform that action at this time.
0 commit comments