@@ -34,6 +34,7 @@ fn fixes_extra_mut() {
3434[FINISHED] dev [unoptimized + debuginfo]
3535" ;
3636 p. expect_cmd ( "cargo-fix fix" )
37+ . env ( "__CARGO_FIX_YOLO" , "true" )
3738 . stdout ( "" )
3839 . stderr ( stderr)
3940 . run ( ) ;
@@ -60,6 +61,7 @@ fn fixes_two_missing_ampersands() {
6061[FINISHED] dev [unoptimized + debuginfo]
6162" ;
6263 p. expect_cmd ( "cargo-fix fix" )
64+ . env ( "__CARGO_FIX_YOLO" , "true" )
6365 . stdout ( "" )
6466 . stderr ( stderr)
6567 . run ( ) ;
@@ -85,6 +87,7 @@ fn tricky() {
8587[FINISHED] dev [unoptimized + debuginfo]
8688" ;
8789 p. expect_cmd ( "cargo-fix fix" )
90+ . env ( "__CARGO_FIX_YOLO" , "true" )
8891 . stdout ( "" )
8992 . stderr ( stderr)
9093 . run ( ) ;
@@ -102,7 +105,9 @@ fn preserve_line_endings() {
102105 )
103106 . build ( ) ;
104107
105- p. expect_cmd ( "cargo-fix fix" ) . run ( ) ;
108+ p. expect_cmd ( "cargo-fix fix" )
109+ . env ( "__CARGO_FIX_YOLO" , "true" )
110+ . run ( ) ;
106111 assert ! ( p. read( "src/lib.rs" ) . contains( "\r \n " ) ) ;
107112}
108113
@@ -118,7 +123,9 @@ fn fix_deny_warnings() {
118123 )
119124 . build ( ) ;
120125
121- p. expect_cmd ( "cargo-fix fix" ) . run ( ) ;
126+ p. expect_cmd ( "cargo-fix fix" )
127+ . env ( "__CARGO_FIX_YOLO" , "true" )
128+ . run ( ) ;
122129}
123130
124131#[ test]
@@ -139,7 +146,9 @@ fn fix_deny_warnings_but_not_others() {
139146 )
140147 . build ( ) ;
141148
142- p. expect_cmd ( "cargo-fix fix" ) . run ( ) ;
149+ p. expect_cmd ( "cargo-fix fix" )
150+ . env ( "__CARGO_FIX_YOLO" , "true" )
151+ . run ( ) ;
143152 assert ! ( !p. read( "src/lib.rs" ) . contains( "let mut x = 3;" ) ) ;
144153 assert ! ( p. read( "src/lib.rs" ) . contains( "fn bar() {}" ) ) ;
145154}
@@ -170,6 +179,7 @@ fn fix_two_files() {
170179 . build ( ) ;
171180
172181 p. expect_cmd ( "cargo-fix fix" )
182+ . env ( "__CARGO_FIX_YOLO" , "true" )
173183 . stderr_contains ( "[FIXING] src/bar.rs (1 fix)" )
174184 . stderr_contains ( "[FIXING] src/lib.rs (1 fix)" )
175185 . run ( ) ;
0 commit comments