diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-01-13 21:33:22 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-01-13 21:33:22 +0100 |
| commit | 1b53e27f270e3c040ee095573af9a5243980191a (patch) | |
| tree | 3ed3e3d17b35cb04ded50a38331438468b61063e /tests | |
| parent | c36a136e6f26ac99e58465ad072c282fe6dbaedf (diff) | |
Some minor improvements ♻
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typeset.rs | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index 6f077ed1..499c5c04 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -50,11 +50,9 @@ fn main() { } let len = filtered.len(); - if len == 0 { - return; - } else if len == 1 { + if len == 1 { println!("Running test ..."); - } else { + } else if len > 1 { println!("Running {} tests", len); } @@ -70,8 +68,19 @@ fn main() { resources: ResourceLoader::new(), })); - let mut ok = true; + let playground = Path::new("playground.typ"); + if playground.exists() { + test( + "playground", + playground, + Path::new("playground.png"), + Path::new("playground.pdf"), + None, + &env, + ); + } + let mut ok = true; for (name, src_path) in filtered { let png_path = Path::new(PNG_DIR).join(&name).with_extension("png"); let pdf_path = Path::new(PDF_DIR).join(&name).with_extension("pdf"); @@ -86,18 +95,6 @@ fn main() { ); } - let playground = Path::new("playground.typ"); - if playground.exists() { - test( - "playground", - playground, - Path::new("playground.png"), - Path::new("playground.pdf"), - None, - &env, - ); - } - if !ok { std::process::exit(1); } |
