@@ -34,6 +34,7 @@ fn fixes_extra_mut() {
34
34
[FINISHED] dev [unoptimized + debuginfo]
35
35
" ;
36
36
p. expect_cmd ( "cargo-fix fix" )
37
+ . env ( "__CARGO_FIX_YOLO" , "true" )
37
38
. stdout ( "" )
38
39
. stderr ( stderr)
39
40
. run ( ) ;
@@ -60,6 +61,7 @@ fn fixes_two_missing_ampersands() {
60
61
[FINISHED] dev [unoptimized + debuginfo]
61
62
" ;
62
63
p. expect_cmd ( "cargo-fix fix" )
64
+ . env ( "__CARGO_FIX_YOLO" , "true" )
63
65
. stdout ( "" )
64
66
. stderr ( stderr)
65
67
. run ( ) ;
@@ -85,6 +87,7 @@ fn tricky() {
85
87
[FINISHED] dev [unoptimized + debuginfo]
86
88
" ;
87
89
p. expect_cmd ( "cargo-fix fix" )
90
+ . env ( "__CARGO_FIX_YOLO" , "true" )
88
91
. stdout ( "" )
89
92
. stderr ( stderr)
90
93
. run ( ) ;
@@ -102,7 +105,9 @@ fn preserve_line_endings() {
102
105
)
103
106
. build ( ) ;
104
107
105
- p. expect_cmd ( "cargo-fix fix" ) . run ( ) ;
108
+ p. expect_cmd ( "cargo-fix fix" )
109
+ . env ( "__CARGO_FIX_YOLO" , "true" )
110
+ . run ( ) ;
106
111
assert ! ( p. read( "src/lib.rs" ) . contains( "\r \n " ) ) ;
107
112
}
108
113
@@ -118,7 +123,9 @@ fn fix_deny_warnings() {
118
123
)
119
124
. build ( ) ;
120
125
121
- p. expect_cmd ( "cargo-fix fix" ) . run ( ) ;
126
+ p. expect_cmd ( "cargo-fix fix" )
127
+ . env ( "__CARGO_FIX_YOLO" , "true" )
128
+ . run ( ) ;
122
129
}
123
130
124
131
#[ test]
@@ -139,7 +146,9 @@ fn fix_deny_warnings_but_not_others() {
139
146
)
140
147
. build ( ) ;
141
148
142
- p. expect_cmd ( "cargo-fix fix" ) . run ( ) ;
149
+ p. expect_cmd ( "cargo-fix fix" )
150
+ . env ( "__CARGO_FIX_YOLO" , "true" )
151
+ . run ( ) ;
143
152
assert ! ( !p. read( "src/lib.rs" ) . contains( "let mut x = 3;" ) ) ;
144
153
assert ! ( p. read( "src/lib.rs" ) . contains( "fn bar() {}" ) ) ;
145
154
}
@@ -170,6 +179,7 @@ fn fix_two_files() {
170
179
. build ( ) ;
171
180
172
181
p. expect_cmd ( "cargo-fix fix" )
182
+ . env ( "__CARGO_FIX_YOLO" , "true" )
173
183
. stderr_contains ( "[FIXING] src/bar.rs (1 fix)" )
174
184
. stderr_contains ( "[FIXING] src/lib.rs (1 fix)" )
175
185
. run ( ) ;
0 commit comments