1use ::std::path::PathBuf;
2
3use ::clap::Parser;
4
5#[derive(Parser, Debug)]
6#[command()]
7pub struct Args {
8 #[arg()]
10 pub path: Option<PathBuf>,
11
12 #[arg(short = 'n', long, default_value="1000000", conflicts_with = "path")]
14 pub max_depth: u32,
15 #[arg(short = 'r', long = "root", conflicts_with = "path")]
17 pub roots: Vec<PathBuf>,
18 #[arg(long, default_value = "1", conflicts_with = "path")]
20 pub minimum_tests: u32,
21
22 #[arg(short = 's', long)]
24 pub source_dir: Vec<PathBuf>,
25 #[arg(long)]
28 pub test_dir: Option<PathBuf>,
29 #[arg(short = 'P', long, default_value = "1", conflicts_with = "path")]
32 pub parallel: u16,
33 }
35
36#[test]
37fn test_cli_args() {
38 Args::try_parse_from(&["cli-test", "file.test", "-n", "2", "-r", "examples", "--root", "cli_tests", "--minimum_tests", "1"]).unwrap();
39 Args::try_parse_from(&["cli-test"]).unwrap();
40}