Skip to content

Commit

Permalink
Improve Foundry test detection
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jul 3, 2024
1 parent 51ab6e4 commit 3e9e580
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions backends/src/foundry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)))),
)
}
}
Expand Down

0 comments on commit 3e9e580

Please # to comment.