summaryrefslogtreecommitdiff
path: root/cli/flags.rs
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2021-07-10 07:29:18 +0800
committerGitHub <noreply@github.com>2021-07-10 01:29:18 +0200
commit9d57a4aaeb18461bbeeea30fc8ab8804357185c1 (patch)
tree3fc1bb0bbb06519c36def59e0d1dc09859c676f5 /cli/flags.rs
parent9b89668065a5cd23f4326855980f7dd59182efaf (diff)
feat(cli/tools/test_runner): add terse reporter (#11156)
This commit adds "--terse" flag to "deno test" that makes testing reporter output one character per test case instead of one line per case. This is an unstable feature.
Diffstat (limited to 'cli/flags.rs')
-rw-r--r--cli/flags.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/flags.rs b/cli/flags.rs
index 400798cbd..2d71762ce 100644
--- a/cli/flags.rs
+++ b/cli/flags.rs
@@ -100,6 +100,7 @@ pub enum DenoSubcommand {
no_run: bool,
fail_fast: bool,
quiet: bool,
+ terse: bool,
allow_none: bool,
include: Option<Vec<String>>,
filter: Option<String>,
@@ -1011,6 +1012,11 @@ fn test_subcommand<'a, 'b>() -> App<'a, 'b> {
.takes_value(false),
)
.arg(
+ Arg::with_name("terse")
+ .long("terse")
+ .help("UNSTABLE: Display one character per test instead of one line"),
+ )
+ .arg(
Arg::with_name("filter")
.set(ArgSettings::AllowLeadingHyphen)
.long("filter")
@@ -1699,6 +1705,7 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) {
let fail_fast = matches.is_present("fail-fast");
let allow_none = matches.is_present("allow-none");
let quiet = matches.is_present("quiet");
+ let terse = matches.is_present("terse");
let filter = matches.value_of("filter").map(String::from);
let shuffle = if matches.is_present("shuffle") {
@@ -1753,6 +1760,7 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) {
doc,
fail_fast,
quiet,
+ terse,
include,
filter,
shuffle,
@@ -3391,6 +3399,7 @@ mod tests {
filter: Some("- foo".to_string()),
allow_none: true,
quiet: false,
+ terse: false,
include: Some(svec!["dir1/", "dir2/"]),
shuffle: None,
concurrent_jobs: 1,