@@ -468,21 +468,6 @@ fn ignore_unknown_features_failure() {
468468 or --group-features
469469 " ,
470470 ) ;
471-
472- cargo_hack ( [
473- "check" ,
474- "--ignore-unknown-features" ,
475- "--feature-powerset" ,
476- "--include-features" ,
477- "a" ,
478- ] )
479- . assert_success ( "real" )
480- . stderr_contains (
481- "
482- --ignore-unknown-features for --include-features is not fully implemented and may not \
483- work as intended
484- " ,
485- ) ;
486471}
487472
488473#[ test]
@@ -2068,3 +2053,45 @@ fn update_readme() {
20682053 let command = "cargo hack --help" ;
20692054 test_helper:: doc:: sync_command_output_to_markdown ( path, "readme-long-help" , command, new) ;
20702055}
2056+
2057+ #[ test]
2058+ fn include_features_ignore_unknown ( ) {
2059+ cargo_hack ( [
2060+ "check" ,
2061+ "--each-feature" ,
2062+ "--include-features" ,
2063+ "a,b" ,
2064+ "--ignore-unknown-features" ,
2065+ ] )
2066+ . assert_success ( "include_features_ignore_unknown" )
2067+ . stderr_contains (
2068+ "
2069+ running `cargo check --no-default-features --features a` on features-a-b (1/4)
2070+ running `cargo check --no-default-features --features b` on features-a-b (2/4)
2071+ running `cargo check --no-default-features --features a` on features-a-c (3/4)
2072+ running `cargo check` on features-c-d (4/4)
2073+ " ,
2074+ )
2075+ . stderr_not_contains ( "--features c" )
2076+ . stderr_not_contains ( "--features d" ) ;
2077+
2078+ cargo_hack ( [
2079+ "check" ,
2080+ "--feature-powerset" ,
2081+ "--include-features" ,
2082+ "a,b" ,
2083+ "--ignore-unknown-features" ,
2084+ ] )
2085+ . assert_success ( "include_features_ignore_unknown" )
2086+ . stderr_contains (
2087+ "
2088+ running `cargo check --no-default-features --features a,b` on features-a-b (1/5)
2089+ running `cargo check --no-default-features --features a` on features-a-b (2/5)
2090+ running `cargo check --no-default-features --features b` on features-a-b (3/5)
2091+ running `cargo check --no-default-features --features a` on features-a-c (4/5)
2092+ running `cargo check` on features-c-d (5/5)
2093+ " ,
2094+ )
2095+ . stderr_not_contains ( "--features c" )
2096+ . stderr_not_contains ( "--features d" ) ;
2097+ }
0 commit comments