diff options
Diffstat (limited to 'cli/flags.rs')
| -rw-r--r-- | cli/flags.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index 53177465d..63182753a 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -99,6 +99,7 @@ pub enum DenoSubcommand { script: String, }, Test { + ignore: Vec<PathBuf>, doc: bool, no_run: bool, fail_fast: Option<NonZeroUsize>, @@ -1025,6 +1026,14 @@ fn test_subcommand<'a, 'b>() -> App<'a, 'b> { runtime_args(SubCommand::with_name("test"), true, true) .setting(AppSettings::TrailingVarArg) .arg( + Arg::with_name("ignore") + .long("ignore") + .takes_value(true) + .use_delimiter(true) + .require_equals(true) + .help("Ignore files"), + ) + .arg( Arg::with_name("no-run") .long("no-run") .help("Cache test modules, but don't run tests") @@ -1768,6 +1777,11 @@ fn run_parse(flags: &mut Flags, matches: &clap::ArgMatches) { fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) { runtime_args_parse(flags, matches, true, true); + let ignore = match matches.values_of("ignore") { + Some(f) => f.map(PathBuf::from).collect(), + None => vec![], + }; + let no_run = matches.is_present("no-run"); let doc = matches.is_present("doc"); let allow_none = matches.is_present("allow-none"); @@ -1836,6 +1850,7 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) { doc, fail_fast, include, + ignore, filter, shuffle, allow_none, @@ -3564,6 +3579,7 @@ mod tests { filter: Some("- foo".to_string()), allow_none: true, include: Some(svec!["dir1/", "dir2/"]), + ignore: vec![], shuffle: None, concurrent_jobs: NonZeroUsize::new(1).unwrap(), }, @@ -3632,6 +3648,7 @@ mod tests { allow_none: false, shuffle: None, include: None, + ignore: vec![], concurrent_jobs: NonZeroUsize::new(4).unwrap(), }, ..Flags::default() @@ -3656,6 +3673,7 @@ mod tests { allow_none: false, shuffle: None, include: None, + ignore: vec![], concurrent_jobs: NonZeroUsize::new(1).unwrap(), }, ..Flags::default() @@ -3684,6 +3702,7 @@ mod tests { allow_none: false, shuffle: None, include: None, + ignore: vec![], concurrent_jobs: NonZeroUsize::new(1).unwrap(), }, enable_testing_features: true, @@ -3706,6 +3725,7 @@ mod tests { allow_none: false, shuffle: Some(1), include: None, + ignore: vec![], concurrent_jobs: NonZeroUsize::new(1).unwrap(), }, watch: false, @@ -3728,6 +3748,7 @@ mod tests { allow_none: false, shuffle: None, include: None, + ignore: vec![], concurrent_jobs: NonZeroUsize::new(1).unwrap(), }, watch: true, |
