We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df7bdfc commit c9898d0Copy full SHA for c9898d0
tests/builder/help.rs
@@ -2416,6 +2416,29 @@ Options:
2416
utils::assert_output(cmd, "demo -h", expected, false);
2417
}
2418
2419
+#[test]
2420
+fn short_with_value() {
2421
+ let cmd = Command::new("demo").arg(
2422
+ Arg::new("baz")
2423
+ .short('z')
2424
+ .value_name("BAZ")
2425
+ .help("Short only")
2426
+ .help_heading("Baz"),
2427
+ );
2428
+
2429
+ let expected = str![[r#"
2430
+Usage: demo [OPTIONS]
2431
2432
+Options:
2433
+ -h, --help Print help
2434
2435
+Baz:
2436
+ -z <BAZ> Short only
2437
2438
+"#]];
2439
+ utils::assert_output(cmd, "demo -h", expected, false);
2440
+}
2441
2442
#[test]
2443
fn issue_1487() {
2444
let cmd = Command::new("test")
0 commit comments