feat(check): change some logic around and add --exact-match
This commit is contained in:
@@ -14,9 +14,16 @@ pub struct Args {
|
||||
#[clap(long)]
|
||||
debug: bool,
|
||||
|
||||
/// Only run tests if their path + name match the given string
|
||||
/// Only run tests if they match any of these strings.
|
||||
/// You can match a module with `-m aiken/list` or `-m list`.
|
||||
/// You can match a test with `-m "aiken/list.{map}"` or `-m "aiken/option.{flatten_1}"`
|
||||
#[clap(short, long)]
|
||||
match_tests: Option<Vec<String>>,
|
||||
|
||||
/// This is meant to be used with `--match-tests`.
|
||||
/// It forces test names to match exactly
|
||||
#[clap(short, long)]
|
||||
exact_match: bool,
|
||||
}
|
||||
|
||||
pub fn exec(
|
||||
@@ -25,9 +32,10 @@ pub fn exec(
|
||||
skip_tests,
|
||||
debug,
|
||||
match_tests,
|
||||
exact_match,
|
||||
}: Args,
|
||||
) -> miette::Result<()> {
|
||||
crate::with_project(directory, |p| {
|
||||
p.check(skip_tests, match_tests.clone(), debug)
|
||||
p.check(skip_tests, match_tests.clone(), debug, exact_match)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user