@@ -6224,253 +6224,3 @@ fn primary_package_env_var() {
6224
6224
6225
6225
foo. cargo ( "test" ) . run ( ) ;
6226
6226
}
6227
-
6228
- #[ cfg_attr( windows, ignore) ] // weird normalization issue with windows and cargo-test-support
6229
- #[ cargo_test]
6230
- fn check_cfg_features ( ) {
6231
- if !is_nightly ( ) {
6232
- // --check-cfg is a nightly only rustc command line
6233
- return ;
6234
- }
6235
-
6236
- let p = project ( )
6237
- . file (
6238
- "Cargo.toml" ,
6239
- r#"
6240
- [project]
6241
- name = "foo"
6242
- version = "0.1.0"
6243
-
6244
- [features]
6245
- f_a = []
6246
- f_b = []
6247
- "# ,
6248
- )
6249
- . file ( "src/main.rs" , "fn main() {}" )
6250
- . build ( ) ;
6251
-
6252
- p. cargo ( "build -v -Zcheck-cfg=features" )
6253
- . masquerade_as_nightly_cargo ( )
6254
- . with_stderr (
6255
- "\
6256
- [COMPILING] foo v0.1.0 [..]
6257
- [RUNNING] `rustc [..] --check-cfg 'values(feature, \" f_a\" , \" f_b\" )' [..]
6258
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
6259
- " ,
6260
- )
6261
- . run ( ) ;
6262
- }
6263
-
6264
- #[ cfg_attr( windows, ignore) ] // weird normalization issue with windows and cargo-test-support
6265
- #[ cargo_test]
6266
- fn check_cfg_features_with_deps ( ) {
6267
- if !is_nightly ( ) {
6268
- // --check-cfg is a nightly only rustc command line
6269
- return ;
6270
- }
6271
-
6272
- let p = project ( )
6273
- . file (
6274
- "Cargo.toml" ,
6275
- r#"
6276
- [project]
6277
- name = "foo"
6278
- version = "0.1.0"
6279
-
6280
- [dependencies]
6281
- bar = { path = "bar/" }
6282
-
6283
- [features]
6284
- f_a = []
6285
- f_b = []
6286
- "# ,
6287
- )
6288
- . file ( "src/main.rs" , "fn main() {}" )
6289
- . file ( "bar/Cargo.toml" , & basic_manifest ( "bar" , "0.1.0" ) )
6290
- . file ( "bar/src/lib.rs" , "#[allow(dead_code)] fn bar() {}" )
6291
- . build ( ) ;
6292
-
6293
- p. cargo ( "build -v -Zcheck-cfg=features" )
6294
- . masquerade_as_nightly_cargo ( )
6295
- . with_stderr (
6296
- "\
6297
- [COMPILING] bar v0.1.0 [..]
6298
- [RUNNING] `rustc [..] --check-cfg 'values(feature)' [..]
6299
- [COMPILING] foo v0.1.0 [..]
6300
- [RUNNING] `rustc --crate-name foo [..] --check-cfg 'values(feature, \" f_a\" , \" f_b\" )' [..]
6301
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
6302
- " ,
6303
- )
6304
- . run ( ) ;
6305
- }
6306
-
6307
- #[ cfg_attr( windows, ignore) ] // weird normalization issue with windows and cargo-test-support
6308
- #[ cargo_test]
6309
- fn check_cfg_features_with_opt_deps ( ) {
6310
- if !is_nightly ( ) {
6311
- // --check-cfg is a nightly only rustc command line
6312
- return ;
6313
- }
6314
-
6315
- let p = project ( )
6316
- . file (
6317
- "Cargo.toml" ,
6318
- r#"
6319
- [project]
6320
- name = "foo"
6321
- version = "0.1.0"
6322
-
6323
- [dependencies]
6324
- bar = { path = "bar/", optional = true }
6325
-
6326
- [features]
6327
- default = ["bar"]
6328
- f_a = []
6329
- f_b = []
6330
- "# ,
6331
- )
6332
- . file ( "src/main.rs" , "fn main() {}" )
6333
- . file ( "bar/Cargo.toml" , & basic_manifest ( "bar" , "0.1.0" ) )
6334
- . file ( "bar/src/lib.rs" , "#[allow(dead_code)] fn bar() {}" )
6335
- . build ( ) ;
6336
-
6337
- p. cargo ( "build -v -Zcheck-cfg=features" )
6338
- . masquerade_as_nightly_cargo ( )
6339
- . with_stderr (
6340
- "\
6341
- [COMPILING] bar v0.1.0 [..]
6342
- [RUNNING] `rustc [..] --check-cfg 'values(feature)' [..]
6343
- [COMPILING] foo v0.1.0 [..]
6344
- [RUNNING] `rustc --crate-name foo [..] --check-cfg 'values(feature, \" bar\" , \" default\" , \" f_a\" , \" f_b\" )' [..]
6345
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
6346
- " ,
6347
- )
6348
- . run ( ) ;
6349
- }
6350
-
6351
- #[ cfg_attr( windows, ignore) ] // weird normalization issue with windows and cargo-test-support
6352
- #[ cargo_test]
6353
- fn check_cfg_features_with_namespaced_features ( ) {
6354
- if !is_nightly ( ) {
6355
- // --check-cfg is a nightly only rustc command line
6356
- return ;
6357
- }
6358
-
6359
- let p = project ( )
6360
- . file (
6361
- "Cargo.toml" ,
6362
- r#"
6363
- [project]
6364
- name = "foo"
6365
- version = "0.1.0"
6366
-
6367
- [dependencies]
6368
- bar = { path = "bar/", optional = true }
6369
-
6370
- [features]
6371
- f_a = ["dep:bar"]
6372
- f_b = []
6373
- "# ,
6374
- )
6375
- . file ( "src/main.rs" , "fn main() {}" )
6376
- . file ( "bar/Cargo.toml" , & basic_manifest ( "bar" , "0.1.0" ) )
6377
- . file ( "bar/src/lib.rs" , "#[allow(dead_code)] fn bar() {}" )
6378
- . build ( ) ;
6379
-
6380
- p. cargo ( "build -v -Zcheck-cfg=features" )
6381
- . masquerade_as_nightly_cargo ( )
6382
- . with_stderr (
6383
- "\
6384
- [COMPILING] foo v0.1.0 [..]
6385
- [RUNNING] `rustc --crate-name foo [..] --check-cfg 'values(feature, \" f_a\" , \" f_b\" )' [..]
6386
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
6387
- " ,
6388
- )
6389
- . run ( ) ;
6390
- }
6391
-
6392
- #[ cfg_attr( windows, ignore) ] // weird normalization issue with windows and cargo-test-support
6393
- #[ cargo_test]
6394
- fn check_cfg_well_known_names ( ) {
6395
- if !is_nightly ( ) {
6396
- // --check-cfg is a nightly only rustc command line
6397
- return ;
6398
- }
6399
-
6400
- let p = project ( )
6401
- . file ( "Cargo.toml" , & basic_manifest ( "foo" , "0.1.0" ) )
6402
- . file ( "src/main.rs" , "fn main() {}" )
6403
- . build ( ) ;
6404
-
6405
- p. cargo ( "build -v -Zcheck-cfg=names" )
6406
- . masquerade_as_nightly_cargo ( )
6407
- . with_stderr (
6408
- "\
6409
- [COMPILING] foo v0.1.0 [..]
6410
- [RUNNING] `rustc [..] --check-cfg 'names()' [..]
6411
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
6412
- " ,
6413
- )
6414
- . run ( ) ;
6415
- }
6416
-
6417
- #[ cfg_attr( windows, ignore) ] // weird normalization issue with windows and cargo-test-support
6418
- #[ cargo_test]
6419
- fn check_cfg_well_known_values ( ) {
6420
- if !is_nightly ( ) {
6421
- // --check-cfg is a nightly only rustc command line
6422
- return ;
6423
- }
6424
-
6425
- let p = project ( )
6426
- . file ( "Cargo.toml" , & basic_manifest ( "foo" , "0.1.0" ) )
6427
- . file ( "src/main.rs" , "fn main() {}" )
6428
- . build ( ) ;
6429
-
6430
- p. cargo ( "build -v -Zcheck-cfg=values" )
6431
- . masquerade_as_nightly_cargo ( )
6432
- . with_stderr (
6433
- "\
6434
- [COMPILING] foo v0.1.0 [..]
6435
- [RUNNING] `rustc [..] --check-cfg 'values()' [..]
6436
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
6437
- " ,
6438
- )
6439
- . run ( ) ;
6440
- }
6441
-
6442
- #[ cfg_attr( windows, ignore) ] // weird normalization issue with windows and cargo-test-support
6443
- #[ cargo_test]
6444
- fn check_cfg_all ( ) {
6445
- if !is_nightly ( ) {
6446
- // --check-cfg is a nightly only rustc command line
6447
- return ;
6448
- }
6449
-
6450
- let p = project ( )
6451
- . file (
6452
- "Cargo.toml" ,
6453
- r#"
6454
- [project]
6455
- name = "foo"
6456
- version = "0.1.0"
6457
-
6458
- [features]
6459
- f_a = []
6460
- f_b = []
6461
- "# ,
6462
- )
6463
- . file ( "src/main.rs" , "fn main() {}" )
6464
- . build ( ) ;
6465
-
6466
- p. cargo ( "build -v -Zcheck-cfg=features,names,values" )
6467
- . masquerade_as_nightly_cargo ( )
6468
- . with_stderr (
6469
- "\
6470
- [COMPILING] foo v0.1.0 [..]
6471
- [RUNNING] `rustc [..] --check-cfg 'values(feature, \" f_a\" , \" f_b\" )' --check-cfg 'names()' --check-cfg 'values()' [..]
6472
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
6473
- " ,
6474
- )
6475
- . run ( ) ;
6476
- }
0 commit comments