From 3e9e58043c3ea228332920aa102ff9818962bc69 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Tue, 2 Jul 2024 17:41:39 -0400 Subject: [PATCH] Improve Foundry test detection --- backends/src/foundry/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backends/src/foundry/mod.rs b/backends/src/foundry/mod.rs index 83a57ecb..b3852101 100644 --- a/backends/src/foundry/mod.rs +++ b/backends/src/foundry/mod.rs @@ -420,13 +420,12 @@ impl RunLow for Foundry { let mut command = Self::test_command(context, &span.source_file); command.args(["--match-test", test_name]); + let pat = format!(" {test_name}("); + ( command, Vec::new(), - Some(( - true, - Box::new(|line| !line.starts_with("No tests match the provided pattern")), - )), + Some((false, Box::new(move |line| line.contains(&pat)))), ) } }