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 c9898d0 commit 9e3c05eCopy full SHA for 9e3c05e
tests/builder/help.rs
@@ -2439,6 +2439,30 @@ Baz:
2439
utils::assert_output(cmd, "demo -h", expected, false);
2440
}
2441
2442
+#[test]
2443
+#[should_panic]
2444
+fn short_with_count() {
2445
+ let cmd = Command::new("demo").arg(
2446
+ Arg::new("baz")
2447
+ .short('z')
2448
+ .action(ArgAction::Count)
2449
+ .help("Short only")
2450
+ .help_heading("Baz"),
2451
+ );
2452
+
2453
+ let expected = str![[r#"
2454
+Usage: demo [OPTIONS]
2455
2456
+Options:
2457
+ -h, --help Print help
2458
2459
+Baz:
2460
+ -z... Short only
2461
2462
+"#]];
2463
+ utils::assert_output(cmd, "demo -h", expected, false);
2464
+}
2465
2466
#[test]
2467
fn issue_1487() {
2468
let cmd = Command::new("test")
0 commit comments