]> git.proxmox.com Git - cargo.git/commitdiff
add test
authorl00556901 <liziqiang5@huawei.com>
Wed, 22 Sep 2021 03:36:08 +0000 (11:36 +0800)
committerl00556901 <liziqiang5@huawei.com>
Wed, 22 Sep 2021 03:36:08 +0000 (11:36 +0800)
tests/testsuite/help.rs

index 0f094e44a8cc16649376b8076de839383c413144..ed91c5fcf27fea6a258e4355df6ff65a2cf8225f 100644 (file)
@@ -138,3 +138,54 @@ fn help_alias() {
     .unwrap();
     help_with_man_and_path("", "my-alias", "build", Path::new(""));
 }
+
+#[cargo_test]
+fn alias_z_flag_help() {
+    cargo_process("build -Z help")
+        .with_stdout_contains(
+            "    -Z allow-features[..]-- Allow *only* the listed unstable features",
+        )
+        .run();
+
+    cargo_process("run -Z help")
+        .with_stdout_contains(
+            "    -Z allow-features[..]-- Allow *only* the listed unstable features",
+        )
+        .run();
+
+    cargo_process("check -Z help")
+        .with_stdout_contains(
+            "    -Z allow-features[..]-- Allow *only* the listed unstable features",
+        )
+        .run();
+
+    cargo_process("test -Z help")
+        .with_stdout_contains(
+            "    -Z allow-features[..]-- Allow *only* the listed unstable features",
+        )
+        .run();
+
+    cargo_process("b -Z help")
+        .with_stdout_contains(
+            "    -Z allow-features[..]-- Allow *only* the listed unstable features",
+        )
+        .run();
+
+    cargo_process("r -Z help")
+        .with_stdout_contains(
+            "    -Z allow-features[..]-- Allow *only* the listed unstable features",
+        )
+        .run();
+
+    cargo_process("c -Z help")
+        .with_stdout_contains(
+            "    -Z allow-features[..]-- Allow *only* the listed unstable features",
+        )
+        .run();
+
+    cargo_process("t -Z help")
+        .with_stdout_contains(
+            "    -Z allow-features[..]-- Allow *only* the listed unstable features",
+        )
+        .run();
+}