summaryrefslogtreecommitdiff
path: root/tests/src/args.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-05-08 13:01:08 +0200
committerLaurenz <laurmaedje@gmail.com>2024-05-17 15:34:20 +0200
commit3cc6e58eabc7261e04baa28423756ab69f6dc220 (patch)
treeb0e4a3379c079e2bc963570c045ef27665ec0141 /tests/src/args.rs
parenta7102f88dd686349139b78c5816c20156491b932 (diff)
Run PDF and SVG export in CI (#4097)
Diffstat (limited to 'tests/src/args.rs')
-rw-r--r--tests/src/args.rs22
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/src/args.rs b/tests/src/args.rs
index fcd4ead1..ddd088fa 100644
--- a/tests/src/args.rs
+++ b/tests/src/args.rs
@@ -20,10 +20,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,
/// Whether to display the syntax tree.
@@ -37,6 +43,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()]