-
Couldn't load subscription status.
- Fork 13.9k
Add normalize() in run-make Diff type
#124561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The run-make-support library was changed cc @jieyouxu |
| let actual_name = self.actual_name.as_ref().unwrap(); | ||
| for (regex, replacement) in &self.normalizers { | ||
| let re = Regex::new(regex).expect("bad regex in custom normalization rule"); | ||
| actual = re.replace_all(&actual, replacement).into_owned(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we assert that we actually replace something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you prefer.
3929007 to
e0ec71f
Compare
|
Thanks! @bors r+ rollup |
Rollup of 4 pull requests Successful merges: - rust-lang#124280 (Port repr128-dwarf run-make test to rmake) - rust-lang#124299 (Add test for issue 106269) - rust-lang#124553 (Write `git-commit-{sha,info}` for Cargo in source tarballs) - rust-lang#124561 (Add `normalize()` in run-make `Diff` type) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124561 - GuillaumeGomez:run-make-normalize, r=jieyouxu Add `normalize()` in run-make `Diff` type I need it to do the same as: ``` //@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" ``` in doctests. I need it in particular for the rust-lang#123974 PR (which contains this commit until this PR current PR is merged). cc `@Urgau` r? `@jieyouxu`
I need it to do the same as:
in doctests.
I need it in particular for the #123974 PR (which contains this commit until this PR current PR is merged).
cc @Urgau
r? @jieyouxu