Skip to content

Commit

Permalink
ignore whitespace in ldd tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed May 24, 2024
1 parent f18cb8a commit f0c38d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/run-make/rust-lld-by-default/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ fn main() {
fn find_lld_version_in_logs(output: &Output) -> bool {
let lld_version_re = Regex::new(r"^LLD [0-9]+\.[0-9]+\.[0-9]+").unwrap();
let stderr = std::str::from_utf8(&output.stderr).unwrap();
stderr.lines().any(|line| lld_version_re.is_match(line))
stderr.lines().any(|line| lld_version_re.is_match(line.trim_whitespace()))
}
2 changes: 1 addition & 1 deletion tests/run-make/rust-lld-custom-target/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ fn main() {
fn find_lld_version_in_logs(output: &Output) -> bool {
let lld_version_re = Regex::new(r"^LLD [0-9]+\.[0-9]+\.[0-9]+").unwrap();
let stderr = std::str::from_utf8(&output.stderr).unwrap();
stderr.lines().any(|line| lld_version_re.is_match(line))
stderr.lines().any(|line| lld_version_re.is_match(line.trim_whitespace()))
}
2 changes: 1 addition & 1 deletion tests/run-make/rust-lld/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ fn main() {
fn find_lld_version_in_logs(output: &Output) -> bool {
let lld_version_re = Regex::new(r"^LLD [0-9]+\.[0-9]+\.[0-9]+").unwrap();
let stderr = std::str::from_utf8(&output.stderr).unwrap();
stderr.lines().any(|line| lld_version_re.is_match(line))
stderr.lines().any(|line| lld_version_re.is_match(line.trim_whitespace()))
}

0 comments on commit f0c38d5

Please sign in to comment.