File tree Expand file tree Collapse file tree 1 file changed +17
-16
lines changed
Expand file tree Collapse file tree 1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -264,27 +264,28 @@ fn files0_pipe_double_nul() {
264264#[ serial( working_dir) ]
265265#[ test]
266266fn files0_no_file ( ) {
267+ let scene = TestScenario :: new ( "find" ) ;
268+ let option: Vec < _ > = "-files0-from xyz.nonexistentFile"
269+ . split ( ' ' )
270+ . collect :: < Vec < _ > > ( ) ;
271+
267272 #[ cfg( unix) ]
268273 {
269- Command :: cargo_bin ( "find" )
270- . expect ( "found binary" )
271- . args ( [ "-files0-from" , "xyz.nonexistentFile" ] )
272- . assert ( )
273- . failure ( )
274- . stderr ( predicate:: str:: contains ( "No such file or directory" ) )
275- . stdout ( predicate:: str:: is_empty ( ) ) ;
274+ scene
275+ . ucmd ( )
276+ . args ( & option)
277+ . fails_with_code ( 1 )
278+ . stderr_contains ( "No such file or directory" )
279+ . no_stdout ( ) ;
276280 }
277281 #[ cfg( windows) ]
278282 {
279- Command :: cargo_bin ( "find" )
280- . expect ( "found binary" )
281- . args ( [ "-files0-from" , "xyz.nonexistantFile" ] )
282- . assert ( )
283- . failure ( )
284- . stderr ( predicate:: str:: contains (
285- "The system cannot find the file specified." ,
286- ) )
287- . stdout ( predicate:: str:: is_empty ( ) ) ;
283+ scene
284+ . ucmd ( )
285+ . args ( & option)
286+ . fails_with_code ( 1 )
287+ . stderr_contains ( "The system cannot find the file specified." )
288+ . no_stdout ( ) ;
288289 }
289290}
290291
You can’t perform that action at this time.
0 commit comments