From b3c8b0368c5977c5408838ba958f64a902e875ef Mon Sep 17 00:00:00 2001 From: Omar Abdulla Date: Sun, 26 Oct 2025 02:46:47 +0300 Subject: [PATCH] Require test argument --- Cargo.lock | 11 +++++++++++ Cargo.toml | 2 +- crates/config/src/lib.rs | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6c274ba..f882991 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1920,6 +1920,7 @@ dependencies = [ "anstyle", "clap_lex", "strsim", + "terminal_size", ] [[package]] @@ -7838,6 +7839,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" +dependencies = [ + "rustix", + "windows-sys 0.59.0", +] + [[package]] name = "thiserror" version = "1.0.69" diff --git a/Cargo.toml b/Cargo.toml index 60178b6..9f602b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ ansi_term = "0.12.1" anyhow = "1.0" bson = { version = "2.15.0" } cacache = { version = "13.1.0" } -clap = { version = "4", features = ["derive"] } +clap = { version = "4", features = ["derive", "wrap_help"] } dashmap = { version = "6.1.0" } foundry-compilers-artifacts = { version = "0.18.0" } futures = { version = "0.3.31" } diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index 0228d1d..cb1ed22 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -24,7 +24,7 @@ use strum::{AsRefStr, Display, EnumString, IntoStaticStr}; use temp_dir::TempDir; #[derive(Clone, Debug, Parser, Serialize, Deserialize)] -#[command(name = "retester")] +#[command(name = "retester", term_width = 100)] pub enum Context { /// Executes tests in the MatterLabs format differentially on multiple targets concurrently. Test(Box), @@ -759,7 +759,7 @@ pub struct CorpusConfiguration { /// - `{metadata_file_path}::{case_idx}::{mode}`: This is very similar to the above specifier /// with the exception that in this case the mode is specified and will be used in the test. #[serde_as(as = "Vec")] - #[arg(short = 't', long = "test")] + #[arg(short = 't', long = "test", required = true)] pub test_specifiers: Vec, }