diff options
Diffstat (limited to 'tests/src/args.rs')
| -rw-r--r-- | tests/src/args.rs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/src/args.rs b/tests/src/args.rs index 33935edf..ca0ee73c 100644 --- a/tests/src/args.rs +++ b/tests/src/args.rs @@ -31,10 +31,16 @@ pub struct CliArguments { /// Does not affect the comparison or the reference image. #[arg(short, long, default_value_t = 1.0)] pub scale: f32, - /// Exports PDF outputs into the artifact store. + /// Whether to run the tests in extended mode, including PDF and SVG + /// export. + /// + /// This is used in CI. + #[arg(long, env = "TYPST_TESTS_EXTENDED")] + pub extended: bool, + /// Runs PDF export. #[arg(long)] pub pdf: bool, - /// Exports SVG outputs into the artifact store. + /// Runs SVG export. #[arg(long)] pub svg: bool, /// Displays the syntax tree. @@ -48,6 +54,18 @@ pub struct CliArguments { pub num_threads: Option<usize>, } +impl CliArguments { + /// Whether to run PDF export. + pub fn pdf(&self) -> bool { + self.pdf || self.extended + } + + /// Whether to run SVG export. + pub fn svg(&self) -> bool { + self.svg || self.extended + } +} + /// What to do. #[derive(Debug, Clone, Subcommand)] #[command()] |
