Skip to content

Commit

Permalink
Fix creusot argument command
Browse files Browse the repository at this point in the history
  • Loading branch information
dewert99 committed Aug 3, 2024
1 parent e13ca38 commit 12ca32c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions creusot/tests/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,14 @@ fn run_creusot(
// Find comment chunks of the form CREUSOT_ARG=ARGUMENT. Does not support spaces in arguments currently (would require real parser)
let args: Vec<_> = header_line
.split(" ")
.filter(|chunk| chunk.contains("CREUSOT_ARG"))
.flat_map(|chunk| chunk.split("=").nth(1))
.filter_map(|chunk| {
let (first, rest) = chunk.split_once("=")?;
if first != "CREUSOT_ARG" {
None
} else {
Some(rest)
}
})
.collect();

cmd.args(&[
Expand Down

0 comments on commit 12ca32c

Please sign in to comment.