@@ -737,7 +737,7 @@ impl Execs {
737
737
}
738
738
}
739
739
740
- fn verify_checks_output ( & self , output : & Output ) {
740
+ fn verify_checks_output ( & self , stdout : & [ u8 ] , stderr : & [ u8 ] ) {
741
741
if self . expect_exit_code . unwrap_or ( 0 ) != 0
742
742
&& self . expect_stdout . is_none ( )
743
743
&& self . expect_stdin . is_none ( )
@@ -758,8 +758,8 @@ impl Execs {
758
758
"`with_status()` is used, but no output is checked.\n \
759
759
The test must check the output to ensure the correct error is triggered.\n \
760
760
--- stdout\n {}\n --- stderr\n {}",
761
- String :: from_utf8_lossy( & output . stdout) ,
762
- String :: from_utf8_lossy( & output . stderr) ,
761
+ String :: from_utf8_lossy( stdout) ,
762
+ String :: from_utf8_lossy( stderr) ,
763
763
) ;
764
764
}
765
765
}
@@ -806,13 +806,13 @@ impl Execs {
806
806
}
807
807
808
808
fn match_output ( & self , actual : & Output ) -> Result < ( ) > {
809
- self . verify_checks_output ( actual) ;
810
809
self . match_status ( actual. status . code ( ) , & actual. stdout , & actual. stderr )
811
810
. and ( self . match_stdout ( & actual. stdout , & actual. stderr ) )
812
811
. and ( self . match_stderr ( & actual. stdout , & actual. stderr ) )
813
812
}
814
813
815
814
fn match_status ( & self , code : Option < i32 > , stdout : & [ u8 ] , stderr : & [ u8 ] ) -> Result < ( ) > {
815
+ self . verify_checks_output ( stdout, stderr) ;
816
816
match self . expect_exit_code {
817
817
None => Ok ( ( ) ) ,
818
818
Some ( expected) if code == Some ( expected) => Ok ( ( ) ) ,
0 commit comments