mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Remove run anyway tip (#7782)
This commit is contained in:
parent
f479d6227e
commit
a27feb309a
7 changed files with 8 additions and 43 deletions
|
@ -163,14 +163,8 @@ fn normalize_for_tests(original_output: &str) -> String {
|
|||
.replace_all(&part_normalized, filepath_replacement)
|
||||
.into_owned();
|
||||
|
||||
// replace tip "You can run the program anyway ..." with a placeholder
|
||||
let run_anyway_replacement = "<ignored for tests>";
|
||||
part_normalized = RUN_ANYWAY_REGEX
|
||||
.replace_all(&part_normalized, run_anyway_replacement)
|
||||
.into_owned();
|
||||
|
||||
// replace error summary timings
|
||||
let error_summary_replacement = "$1 error and $2 warning found in <ignored for test> ms";
|
||||
let error_summary_replacement = "$1 error$2 and $3 warning$4 found in <ignored for test> ms";
|
||||
ERROR_SUMMARY_REGEX
|
||||
.replace_all(&part_normalized, error_summary_replacement)
|
||||
.into_owned()
|
||||
|
@ -181,9 +175,7 @@ lazy_static! {
|
|||
static ref TIMING_REGEX: Regex = Regex::new(r" in (\d+) ms\.").expect("Invalid regex pattern");
|
||||
static ref FILEPATH_REGEX: Regex =
|
||||
Regex::new(r"\[([^:]+):(\d+)\]").expect("Invalid filepath regex pattern");
|
||||
static ref RUN_ANYWAY_REGEX: Regex =
|
||||
Regex::new(r"the program anyway with\s+.*").expect("Invalid run anyway regex pattern");
|
||||
static ref ERROR_SUMMARY_REGEX: Regex =
|
||||
Regex::new(r"(\d+) error(?:s)? and (\d+) warning(?:s)? found in \d+ ms")
|
||||
Regex::new(r"(\d+) error(s)? and (\d+) warning(s)? found in \d+ ms")
|
||||
.expect("Invalid error summary regex pattern");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue