File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ pub(crate) struct Verbosity {
3030
3131 #[ arg(
3232 long,
33+ short,
3334 help = "Use quiet output" ,
3435 action = clap:: ArgAction :: Count ,
3536 global = true ,
Original file line number Diff line number Diff line change @@ -69,6 +69,26 @@ fn test_quiet_output() -> anyhow::Result<()> {
6969 ----- stderr -----
7070 " ) ;
7171
72+ // We allow `-q`
73+ assert_cmd_snapshot ! ( case. command( ) . arg( "-q" ) , @r"
74+ success: false
75+ exit_code: 1
76+ ----- stdout -----
77+ Found 1 diagnostic
78+
79+ ----- stderr -----
80+ " ) ;
81+
82+ // And repeated `-qq`
83+ assert_cmd_snapshot ! ( case. command( ) . arg( "-qq" ) , @r"
84+ success: false
85+ exit_code: 1
86+ ----- stdout -----
87+ Found 1 diagnostic
88+
89+ ----- stderr -----
90+ " ) ;
91+
7292 Ok ( ( ) )
7393}
7494
You can’t perform that action at this time.
0 commit comments