File tree Expand file tree Collapse file tree 2 files changed +37
-30
lines changed Expand file tree Collapse file tree 2 files changed +37
-30
lines changed Original file line number Diff line number Diff line change @@ -162,36 +162,6 @@ invalid value: integer `-1`, expected u32
162
162
. run ( ) ;
163
163
}
164
164
165
- #[ cargo_test]
166
- fn default_cargo_config_jobs ( ) {
167
- let p = project ( )
168
- . file ( "src/lib.rs" , "" )
169
- . file (
170
- ".cargo/config" ,
171
- r#"
172
- [build]
173
- jobs = 1
174
- "# ,
175
- )
176
- . build ( ) ;
177
- p. cargo ( "build -v" ) . run ( ) ;
178
- }
179
-
180
- #[ cargo_test]
181
- fn good_cargo_config_jobs ( ) {
182
- let p = project ( )
183
- . file ( "src/lib.rs" , "" )
184
- . file (
185
- ".cargo/config" ,
186
- r#"
187
- [build]
188
- jobs = 4
189
- "# ,
190
- )
191
- . build ( ) ;
192
- p. cargo ( "build -v" ) . run ( ) ;
193
- }
194
-
195
165
#[ cargo_test]
196
166
fn invalid_global_config ( ) {
197
167
let p = project ( )
Original file line number Diff line number Diff line change @@ -4297,13 +4297,50 @@ required by package `bar v0.1.0 ([..]/foo)`
4297
4297
. run ( ) ;
4298
4298
}
4299
4299
4300
+ #[ cargo_test]
4301
+ fn default_cargo_config_jobs ( ) {
4302
+ let p = project ( )
4303
+ . file ( "src/lib.rs" , "" )
4304
+ . file (
4305
+ ".cargo/config" ,
4306
+ r#"
4307
+ [build]
4308
+ jobs = 1
4309
+ "# ,
4310
+ )
4311
+ . build ( ) ;
4312
+ p. cargo ( "build -v" ) . run ( ) ;
4313
+ }
4314
+
4315
+ #[ cargo_test]
4316
+ fn good_cargo_config_jobs ( ) {
4317
+ let p = project ( )
4318
+ . file ( "src/lib.rs" , "" )
4319
+ . file (
4320
+ ".cargo/config" ,
4321
+ r#"
4322
+ [build]
4323
+ jobs = 4
4324
+ "# ,
4325
+ )
4326
+ . build ( ) ;
4327
+ p. cargo ( "build -v" ) . run ( ) ;
4328
+ }
4329
+
4300
4330
#[ cargo_test]
4301
4331
fn invalid_jobs ( ) {
4302
4332
let p = project ( )
4303
4333
. file ( "Cargo.toml" , & basic_bin_manifest ( "foo" ) )
4304
4334
. file ( "src/foo.rs" , & main_file ( r#""i am foo""# , & [ ] ) )
4305
4335
. build ( ) ;
4306
4336
4337
+ p. cargo ( "build --jobs -1" )
4338
+ . with_status ( 1 )
4339
+ . with_stderr_contains (
4340
+ "error: Found argument '-1' which wasn't expected, or isn't valid in this context" ,
4341
+ )
4342
+ . run ( ) ;
4343
+
4307
4344
p. cargo ( "build --jobs over9000" )
4308
4345
. with_status ( 1 )
4309
4346
. with_stderr ( "error: Invalid value: could not parse `over9000` as a number" )
You can’t perform that action at this time.
0 commit comments