File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -544,7 +544,7 @@ impl Cheatcode for ffiCall {
544
544
let stderr = String :: from_utf8_lossy ( & output. stderr ) ;
545
545
warn ! ( target: "cheatcodes" , ?input, ?stderr, "ffi command wrote to stderr" ) ;
546
546
}
547
-
547
+
548
548
// We already hex-decoded the stdout in the `ffi` helper function.
549
549
Ok ( output. stdout . abi_encode ( ) )
550
550
}
@@ -900,7 +900,7 @@ mod tests {
900
900
#[ test]
901
901
fn test_ffi_fails_on_error_code ( ) {
902
902
let mut cheats = cheats ( ) ;
903
-
903
+
904
904
// Use a command that is guaranteed to fail with a non-zero exit code on any platform.
905
905
#[ cfg( unix) ]
906
906
let args = vec ! [ "false" . to_string( ) ] ;
@@ -911,10 +911,13 @@ mod tests {
911
911
912
912
// Assert that the cheatcode returned an error.
913
913
assert ! ( result. is_err( ) , "Expected ffi cheatcode to fail, but it succeeded" ) ;
914
-
914
+
915
915
// Assert that the error message contains the expected information.
916
916
let err_msg = result. unwrap_err ( ) . to_string ( ) ;
917
- assert ! ( err_msg. contains( "exited with code 1" ) , "Error message did not contain exit code: {}" , err_msg) ;
917
+ assert ! (
918
+ err_msg. contains( "exited with code 1" ) ,
919
+ "Error message did not contain exit code: {err_msg}"
920
+ ) ;
918
921
}
919
922
920
923
#[ test]
You can’t perform that action at this time.
0 commit comments