Repository: taiki-e/cargo-hack (language: rust)

Issue:
Should --each-feature and --feature-powerset run --all-features?
default/no-default features are already included, so all-features also need to be included?


Discussion / hints:
It would make sense for `--feature-powerset` to include this, because `--all-features` is one of the combinations of features. (I'm not sure about `--each-feature` should do this or not.) 

Also, if `--skip` is passed, then `--all-features` should be skipped.
> Also, if `--skip` is passed, then `--all-features` should be skipped.

Nah, it's not clear how this should interact with #48.
I prefer to do this on both flags and to add `--skip-all-features` flag, as said in #48.

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index aafa69f3..10cf4a37 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,12 @@ This project adheres to [Semantic Versioning](https://semver.org).
 
 ## [Unreleased]
 
+* Treat `--all-features` flag as one of feature combinations. See [#42][42] for details.
+
+* Add `--skip-all-features` flag. See [#42][42] for details.
+
+[42]: https://github.com/taiki-e/cargo-hack/pull/42
+
 ## [0.3.14] - 2020-10-10
 
 * [Add `--depth` option.][59] See [#59][59] for details.
diff --git a/src/cli.rs b/src/cli.rs
index 0a9a82d5..f88c4673 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -16,18 +16,12 @@ const HELP: &[(&str, &str, &str, &[&str])] = &[
     ("", "--exclude <SPEC>...", "Exclude packages from the check", &[]),
     ("", "--manifest-path <PATH>", "Path to Cargo.toml", &[]),
     ("", "--features <FEATURES>...", "Space-separated list of features to activate", &[]),
-    (
-        "",
-        "--each-feature",
-        "Perform for each feature which includes --no-default-features flag and default features of the package",
-        &[],
-    ),
-    (
-        "",
-        "--feature-powerset",
-        "Perform for the feature powerset which includes --no-default-features flag and default features of the package",
-        &[],
-    ),
+    ("", "--each-feature", "Perform for each feature of the package", &[
+        "This also includes runs with just --no-default-features flag, --all-features flag, and default features.",
+    ]),
+    ("", "--feature-powerset", "Perform for the feature powerset of the package", &[
+        "This also includes runs with just --no-default-features flag, --all-features flag, and default features.",
+    ]),
     ("", "--optional-deps [DEPS]...", "Use optional dependencies as features", &[
         "If DEPS are not specified, all optional dependencies are considered as features.",
         "This flag can only be used with either --each-feature flag or --feature-powerset flag.",
@@ -39,6 +33,9 @@ const HELP: &[(&str, &str, &str, &[&str])] = &[
     ("", "--skip-no-default-features", "Skip run of just --no-default-features flag", &[
         "This flag can only be used with either --each-feature flag or --feature-powerset flag.",
     ]),
+    ("", "--skip-all-features", "Skip run of just --all-features flag", &[
+        "This flag can only be used with either --each-feature flag or --feature-powerset flag.",
+    ]),
     (
         "",
         "--depth <NUM>",
@@ -121,7 +118,7 @@ impl fmt::Display for Help {
         writeln!(
             f,
             "\
-{0} {1}\n\n{2}
+{0} {1}\n{2}
 USAGE:
     cargo hack [OPTIONS] [SUBCOMMAND]\n
 Use -h for short descriptions and --help for more details.\n
@@ -195,6 +192,8 @@ pub(crate) struct Args {
     pub(crate) optional_deps: Option<Vec<String>>,
     /// --skip-no-default-features
     pub(crate) skip_no_default_features: bool,
+    /// --skip-all-features
+    pub(crate) skip_all_features: bool,
     /// --clean-per-run
     pub(crate) clean_per_run: bool,
     /// -v, --verbose, -vv
@@ -279,6 +278,7 @@ pub(crate) fn args(coloring: &mut Option<Coloring>) -> Result<Option<Args>> {
     let mut ignore_unknown_features = false;
     let mut ignore_non_exist_features = false;
     let mut skip_no_default_features = false;
+    let mut skip_all_features = false;
     let mut clean_per_run = false;
     let mut verbose = false;
     let mut depth = None;
@@ -420,6 +420,7 @@ pub(crate) fn args(coloring: &mut Option<Coloring>) -> Result<Option<Args>> {
                 "--feature-powerset" => parse_flag!(feature_powerset),
                 "--ignore-private" => parse_flag!(ignore_private),
                 "--skip-no-default-features" => parse_flag!(skip_no_default_features),
+                "--skip-all-features" => parse_flag!(skip_all_features),
                 "--clean-per-run" => parse_flag!(clean_per_run),
                 "--ignore-unknown-features" => {
                     if ignore_unknown_features || ignore_non_exist_features {
@@ -474,6 +475,10 @@ pub(crate) fn args(coloring: &mut Option<Coloring>) -> Result<Option<Args>> {
             bail!(
                 "--skip-no-default-features can only be used with either --each-feature or --feature-powerset"
             );
+        } else if skip_all_features {
+            bail!(
+                "--skip-all-features can only be used with either --each-feature or --feature-powerset"
+            );
         }
     }
     if depth.is_some() && !feature_powerset {
@@ -562,6 +567,7 @@ For more information try --help
         ignore_unknown_features: ignore_unknown_features || ignore_non_exist_features,
         optional_deps,
         skip_no_default_features,
+        skip_all_features,
         clean_per_run,
         depth,
 
diff --git a/src/package.rs b/src/package.rs
index 3f9f5ee8..3fc31a2c 100644
--- a/src/package.rs
+++ b/src/package.rs
@@ -81,13 +81,10 @@ impl<'a> Kind<'a> {
                 *total += 1;
                 Kind::Nomal { show_progress: true }
             } else {
-                *total += features.len();
-                if !args.skip.iter().any(|x| x == "default") {
-                    *total += 1;
-                }
-                if !args.skip_no_default_features {
-                    *total += 1;
-                }
+                *total += features.len()
+                    + (!args.skip.iter().any(|x| x == "default")) as usize
+                    + (!args.skip_no_default_features) as usize
+                    + (!args.skip_all_features) as usize;
                 Kind::Each { features }
             }
         } else if args.feature_powerset {
@@ -102,13 +99,10 @@ impl<'a> Kind<'a> {
                 Kind::Nomal { show_progress: true }
             } else {
                 // -1: the first element of a powerset is `[]`
-                *total += features.len() - 1;
-                if !args.skip.iter().any(|x| x == "default") {
-                    *total += 1;
-                }
-                if !args.skip_no_default_features {
-                    *total += 1;
-                }
+                *total += features.len() - 1
+                    + (!args.skip.iter().any(|x| x == "default")) as usize
+                    + (!args.skip_no_default_features) as usize
+                    + (!args.skip_all_features) as usize;
                 Kind::Powerset { features }
             }
         } else {
@@ -151,18 +145,28 @@ pub(crate) fn exec(
     }
 
     match &package.kind {
-        Kind::Each { features } => features
-            .iter()
-            .try_for_each(|f| exec_cargo_with_features(args, package, &line, info, Some(f))),
+        Kind::Each { features } => {
+            features
+                .iter()
+                .try_for_each(|f| exec_cargo_with_features(args, package, &line, info, Some(f)))?;
+        }
         Kind::Powerset { features } => {
             // The first element of a powerset is `[]` so it should be skipped.
             features
                 .iter()
                 .skip(1)
-                .try_for_each(|f| exec_cargo_with_features(args, package, &line, info, f))
+                .try_for_each(|f| exec_cargo_with_features(args, package, &line, info, f))?;
         }
         _ => unreachable!(),
     }
+
+    if !args.skip_all_features {
+        // run with all features
+        line.arg("--all-features");
+        exec_cargo(args, package, &mut line, info, true)?;
+    }
+
+    Ok(())
 }
 
 fn exec_cargo_with_features(


Test patch:
diff --git a/tests/long-help.txt b/tests/long-help.txt
index f03c8053..05dc2133 100644
--- a/tests/long-help.txt
+++ b/tests/long-help.txt
@@ -1,5 +1,4 @@
 cargo-hack 0.3.14
-
 A tool to work around some limitations on cargo.
 
 USAGE:
@@ -27,10 +26,14 @@ OPTIONS:
             Space-separated list of features to activate.
 
         --each-feature
-            Perform for each feature which includes --no-default-features flag and default features of the package.
+            Perform for each feature of the package.
+
+            This also includes runs with just --no-default-features flag, --all-features flag, and default features.
 
         --feature-powerset
-            Perform for the feature powerset which includes --no-default-features flag and default features of the package.
+            Perform for the feature powerset of the package.
+
+            This also includes runs with just --no-default-features flag, --all-features flag, and default features.
 
         --optional-deps [DEPS]...
             Use optional dependencies as features.
@@ -51,6 +54,11 @@ OPTIONS:
 
             This flag can only be used with either --each-feature flag or --feature-powerset flag.
 
+        --skip-all-features
+            Skip run of just --all-features flag.
+
+            This flag can only be used with either --each-feature flag or --feature-powerset flag.
+
         --depth <NUM>
             Specify a max number of simultaneous feature flags of --feature-powerset.
 
diff --git a/tests/short-help.txt b/tests/short-help.txt
index 874f78fd..13eae892 100644
--- a/tests/short-help.txt
+++ b/tests/short-help.txt
@@ -1,5 +1,4 @@
 cargo-hack 0.3.14
-
 A tool to work around some limitations on cargo.
 
 USAGE:
@@ -14,11 +13,12 @@ OPTIONS:
         --exclude <SPEC>...        Exclude packages from the check
         --manifest-path <PATH>     Path to Cargo.toml
         --features <FEATURES>...   Space-separated list of features to activate
-        --each-feature             Perform for each feature which includes --no-default-features flag and default features of the package
-        --feature-powerset         Perform for the feature powerset which includes --no-default-features flag and default features of the package
+        --each-feature             Perform for each feature of the package
+        --feature-powerset         Perform for the feature powerset of the package
         --optional-deps [DEPS]...  Use optional dependencies as features
         --skip <FEATURES>...       Space-separated list of features to skip
         --skip-no-default-features Skip run of just --no-default-features flag
+        --skip-all-features        Skip run of just --all-features flag
         --depth <NUM>              Specify a max number of simultaneous feature flags of --feature-powerset
         --no-dev-deps              Perform without dev-dependencies
         --remove-dev-deps          Equivalent to --no-dev-deps flag except for does not restore the original `Cargo.toml` after performed
diff --git a/tests/test.rs b/tests/test.rs
index 1deffff4..dd82bd9d 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -506,16 +506,19 @@ fn each_feature() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check` on real (1/5)")
-        .assert_stderr_contains("running `cargo check --no-default-features` on real (2/5)")
+        .assert_stderr_contains("running `cargo check` on real (1/6)")
+        .assert_stderr_contains("running `cargo check --no-default-features` on real (2/6)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a` on real (3/5)",
+            "running `cargo check --no-default-features --features a` on real (3/6)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b` on real (4/5)",
+            "running `cargo check --no-default-features --features b` on real (4/6)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features c` on real (5/5)",
+            "running `cargo check --no-default-features --features c` on real (5/6)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --all-features` on real (6/6)",
         );
 
     // with other feature
@@ -525,18 +528,21 @@ fn each_feature() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check --features a` on real (1/5)")
+        .assert_stderr_contains("running `cargo check --features a` on real (1/6)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a` on real (2/5)",
+            "running `cargo check --no-default-features --features a` on real (2/6)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a,a` on real (3/5)",
+            "running `cargo check --no-default-features --features a,a` on real (3/6)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a,b` on real (4/5)",
+            "running `cargo check --no-default-features --features a,b` on real (4/6)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a,c` on real (5/5)",
+            "running `cargo check --no-default-features --features a,c` on real (5/6)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --all-features --features a` on real (6/6)",
         );
 }
 
@@ -548,28 +554,65 @@ fn feature_powerset() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check` on real (1/9)")
-        .assert_stderr_contains("running `cargo check --no-default-features` on real (2/9)")
+        .assert_stderr_contains("running `cargo check` on real (1/10)")
+        .assert_stderr_contains("running `cargo check --no-default-features` on real (2/10)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a` on real (3/9)",
+            "running `cargo check --no-default-features --features a` on real (3/10)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b` on real (4/9)",
+            "running `cargo check --no-default-features --features b` on real (4/10)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features c` on real (6/9)",
+            "running `cargo check --no-default-features --features c` on real (6/10)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a,b` on real (5/9)",
+            "running `cargo check --no-default-features --features a,b` on real (5/10)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a,c` on real (7/9)",
+            "running `cargo check --no-default-features --features a,c` on real (7/10)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b,c` on real (8/9)",
+            "running `cargo check --no-default-features --features b,c` on real (8/10)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features a,b,c` on real (9/10)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --all-features` on real (10/10)",
+        );
+
+    // with other feature
+    cargo_hack()
+        .args(&["check", "--feature-powerset", "--features=a"])
+        .current_dir(test_dir("tests/fixtures/real"))
+        .output()
+        .unwrap()
+        .assert_success()
+        .assert_stderr_contains("running `cargo check --features a` on real (1/10)")
+        .assert_stderr_contains("running `cargo check --no-default-features --features a` on real (2/10)")
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features a,a` on real (3/10)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features a,b` on real (4/10)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features a,c` on real (6/10)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features a,a,b` on real (5/10)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features a,a,c` on real (7/10)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features a,b,c` on real (8/10)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features a,a,b,c` on real (9/10)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a,b,c` on real (9/9)",
+            "running `cargo check --no-default-features --all-features --features a` on real (10/10)",
         );
 }
 
@@ -581,25 +624,28 @@ fn feature_powerset_depth() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check` on real (1/8)")
-        .assert_stderr_contains("running `cargo check --no-default-features` on real (2/8)")
+        .assert_stderr_contains("running `cargo check` on real (1/9)")
+        .assert_stderr_contains("running `cargo check --no-default-features` on real (2/9)")
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features a` on real (3/9)",
+        )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a` on real (3/8)",
+            "running `cargo check --no-default-features --features b` on real (4/9)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b` on real (4/8)",
+            "running `cargo check --no-default-features --features c` on real (6/9)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features c` on real (6/8)",
+            "running `cargo check --no-default-features --features a,b` on real (5/9)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a,b` on real (5/8)",
+            "running `cargo check --no-default-features --features a,c` on real (7/9)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a,c` on real (7/8)",
+            "running `cargo check --no-default-features --features b,c` on real (8/9)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b,c` on real (8/8)",
+            "running `cargo check --no-default-features --all-features` on real (9/9)",
         )
         .assert_stderr_not_contains("--features a,b,c");
 }
@@ -625,17 +671,18 @@ fn each_feature_skip_success() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check` on real (1/4)")
-        .assert_stderr_contains("running `cargo check --no-default-features` on real (2/4)")
+        .assert_stderr_contains("running `cargo check` on real (1/5)")
+        .assert_stderr_contains("running `cargo check --no-default-features` on real (2/5)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b` on real (3/4)",
+            "running `cargo check --no-default-features --features b` on real (3/5)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features c` on real (4/4)",
+            "running `cargo check --no-default-features --features c` on real (4/5)",
         )
-        .assert_stderr_not_contains(
-            "running `cargo check --no-default-features --features a` on real",
-        );
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --all-features` on real (5/5)",
+        )
+        .assert_stderr_not_contains("--features a");
 }
 
 #[test]
@@ -646,25 +693,24 @@ fn powerset_skip_success() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check` on real")
-        .assert_stderr_contains("running `cargo check --no-default-features` on real")
-        .assert_stderr_contains("running `cargo check --no-default-features --features b` on real")
-        .assert_stderr_contains("running `cargo check --no-default-features --features c` on real")
+        .assert_stderr_contains("running `cargo check` on real (1/6)")
+        .assert_stderr_contains("running `cargo check --no-default-features` on real (2/6)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b,c` on real",
+            "running `cargo check --no-default-features --features b` on real (3/6)",
         )
-        .assert_stderr_not_contains(
-            "running `cargo check --no-default-features --features a` on real",
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features c` on real (4/6)",
         )
-        .assert_stderr_not_contains(
-            "running `cargo check --no-default-features --features a,b` on real",
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features b,c` on real (5/6)",
         )
-        .assert_stderr_not_contains(
-            "running `cargo check --no-default-features --features a,c` on real",
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --all-features` on real (6/6)",
         )
-        .assert_stderr_not_contains(
-            "running `cargo check --no-default-features --features a,b,c` on real",
-        );
+        .assert_stderr_not_contains("--features a")
+        .assert_stderr_not_contains("--features a,b")
+        .assert_stderr_not_contains("--features a,c")
+        .assert_stderr_not_contains("--features a,b,c");
 }
 
 #[test]
@@ -676,15 +722,18 @@ fn skip_default() {
         .unwrap()
         .assert_success()
         .assert_stderr_not_contains("running `cargo check` on real")
-        .assert_stderr_contains("running `cargo check --no-default-features` on real (1/4)")
+        .assert_stderr_contains("running `cargo check --no-default-features` on real (1/5)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a` on real (2/4)",
+            "running `cargo check --no-default-features --features a` on real (2/5)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features b` on real (3/5)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b` on real (3/4)",
+            "running `cargo check --no-default-features --features c` on real (4/5)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features c` on real (4/4)",
+            "running `cargo check --no-default-features --all-features` on real (5/5)",
         );
 }
 
@@ -696,16 +745,43 @@ fn skip_no_default_features() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check` on real (1/4)")
+        .assert_stderr_contains("running `cargo check` on real (1/5)")
         .assert_stderr_not_contains("running `cargo check --no-default-features` on real")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a` on real (2/4)",
+            "running `cargo check --no-default-features --features a` on real (2/5)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features b` on real (3/5)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features c` on real (4/5)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --all-features` on real (5/5)",
+        );
+}
+
+#[test]
+fn skip_all_features() {
+    cargo_hack()
+        .args(&["check", "--each-feature", "--skip-all-features"])
+        .current_dir(test_dir("tests/fixtures/real"))
+        .output()
+        .unwrap()
+        .assert_success()
+        .assert_stderr_contains("running `cargo check` on real (1/5)")
+        .assert_stderr_contains("running `cargo check --no-default-features` on real (2/5)")
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features a` on real (3/5)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b` on real (3/4)",
+            "running `cargo check --no-default-features --features b` on real (4/5)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features c` on real (4/4)",
+            "running `cargo check --no-default-features --features c` on real (5/5)",
+        )
+        .assert_stderr_not_contains(
+            "running `cargo check --no-default-features --all-features` on real",
         );
 }
 
@@ -717,49 +793,61 @@ fn each_feature_all() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check` on member1 (1/20)")
-        .assert_stderr_contains("running `cargo check --no-default-features` on member1 (2/20)")
+        .assert_stderr_contains("running `cargo check` on member1 (1/24)")
+        .assert_stderr_contains("running `cargo check --no-default-features` on member1 (2/24)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a` on member1 (3/20)",
+            "running `cargo check --no-default-features --features a` on member1 (3/24)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b` on member1 (4/20)",
+            "running `cargo check --no-default-features --features b` on member1 (4/24)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features c` on member1 (5/20)",
+            "running `cargo check --no-default-features --features c` on member1 (5/24)",
         )
-        .assert_stderr_contains("running `cargo check` on member2 (6/20)")
-        .assert_stderr_contains("running `cargo check --no-default-features` on member2 (7/20)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a` on member2 (8/20)",
+            "running `cargo check --no-default-features --all-features` on member1 (6/24)",
         )
+        .assert_stderr_contains("running `cargo check` on member2 (7/24)")
+        .assert_stderr_contains("running `cargo check --no-default-features` on member2 (8/24)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b` on member2 (9/20)",
+            "running `cargo check --no-default-features --features a` on member2 (9/24)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features c` on member2 (10/20)",
+            "running `cargo check --no-default-features --features b` on member2 (10/24)",
         )
-        .assert_stderr_contains("running `cargo check` on member3 (11/20)")
-        .assert_stderr_contains("running `cargo check --no-default-features` on member3 (12/20)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a` on member3 (13/20)",
+            "running `cargo check --no-default-features --features c` on member2 (11/24)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b` on member3 (14/20)",
+            "running `cargo check --no-default-features --all-features` on member2 (12/24)",
         )
+        .assert_stderr_contains("running `cargo check` on member3 (13/24)")
+        .assert_stderr_contains("running `cargo check --no-default-features` on member3 (14/24)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features c` on member3 (15/20)",
+            "running `cargo check --no-default-features --features a` on member3 (15/24)",
         )
-        .assert_stderr_contains("running `cargo check` on real (16/20)")
-        .assert_stderr_contains("running `cargo check --no-default-features` on real (17/20)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features a` on real (18/20)",
+            "running `cargo check --no-default-features --features b` on member3 (16/24)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features b` on real (19/20)",
+            "running `cargo check --no-default-features --features c` on member3 (17/24)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features c` on real (20/20)",
+            "running `cargo check --no-default-features --all-features` on member3 (18/24)",
+        )
+        .assert_stderr_contains("running `cargo check` on real (19/24)")
+        .assert_stderr_contains("running `cargo check --no-default-features` on real (20/24)")
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features a` on real (21/24)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features b` on real (22/24)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features c` on real (23/24)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --all-features` on real (24/24)",
         );
 }
 
@@ -853,13 +941,9 @@ fn optional_deps() {
         .unwrap()
         .assert_success()
         .assert_stderr_contains("running `cargo check` on optional_deps (1/1)")
-        .assert_stderr_not_contains("running `cargo check --no-default-features` on optional_deps")
-        .assert_stderr_not_contains(
-            "running `cargo check --no-default-features --features real` on optional_deps",
-        )
-        .assert_stderr_not_contains(
-            "running `cargo check  --no-default-features --features renemed` on optional_deps",
-        );
+        .assert_stderr_not_contains("--no-default-features")
+        .assert_stderr_not_contains("--features real")
+        .assert_stderr_not_contains("--features renemed");
 
     cargo_hack()
         .args(&["check", "--each-feature", "--optional-deps"])
@@ -867,15 +951,18 @@ fn optional_deps() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check` on optional_deps (1/4)")
+        .assert_stderr_contains("running `cargo check` on optional_deps (1/5)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features` on optional_deps (2/4)",
+            "running `cargo check --no-default-features` on optional_deps (2/5)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features real` on optional_deps (3/4)",
+            "running `cargo check --no-default-features --features real` on optional_deps (3/5)",
+        )
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features renemed` on optional_deps (4/5)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features renemed` on optional_deps (4/4)",
+            "running `cargo check --no-default-features --all-features` on optional_deps (5/5)",
         );
 
     cargo_hack()
@@ -884,16 +971,17 @@ fn optional_deps() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check` on optional_deps (1/3)")
+        .assert_stderr_contains("running `cargo check` on optional_deps (1/4)")
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features` on optional_deps (2/4)",
+        )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features` on optional_deps (2/3)",
+            "running `cargo check --no-default-features --features real` on optional_deps (3/4)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features real` on optional_deps (3/3)",
+            "running `cargo check --no-default-features --all-features` on optional_deps (4/4)",
         )
-        .assert_stderr_not_contains(
-            "running `cargo check --no-default-features --features renemed` on optional_deps",
-        );
+        .assert_stderr_not_contains("--features renemed");
 
     cargo_hack()
         .args(&["check", "--each-feature", "--optional-deps=renemed"])
@@ -901,15 +989,16 @@ fn optional_deps() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check` on optional_deps (1/3)")
+        .assert_stderr_contains("running `cargo check` on optional_deps (1/4)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features` on optional_deps (2/3)",
+            "running `cargo check --no-default-features` on optional_deps (2/4)",
         )
-        .assert_stderr_not_contains(
-            "running `cargo check --no-default-features --features real` on optional_deps",
+        .assert_stderr_not_contains("--features real")
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features renemed` on optional_deps (3/4)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features renemed` on optional_deps (3/3)",
+            "running `cargo check --no-default-features --all-features` on optional_deps (4/4)",
         );
 
     cargo_hack()
@@ -929,15 +1018,16 @@ fn skip_optional_deps() {
         .output()
         .unwrap()
         .assert_success()
-        .assert_stderr_contains("running `cargo check` on optional_deps (1/3)")
+        .assert_stderr_contains("running `cargo check` on optional_deps (1/4)")
         .assert_stderr_contains(
-            "running `cargo check --no-default-features` on optional_deps (2/3)",
+            "running `cargo check --no-default-features` on optional_deps (2/4)",
         )
-        .assert_stderr_not_contains(
-            "running `cargo check --no-default-features --features real` on optional_deps",
+        .assert_stderr_not_contains("--features real")
+        .assert_stderr_contains(
+            "running `cargo check --no-default-features --features renemed` on optional_deps (3/4)",
         )
         .assert_stderr_contains(
-            "running `cargo check --no-default-features --features renemed` on optional_deps (3/3)",
+            "running `cargo check --no-default-features --all-features` on optional_deps (4/4)",
         );
 }