From 8160974ce8e751e3283d61493325ae71dccd0877 Mon Sep 17 00:00:00 2001 From: lcnr Date: Fri, 24 May 2024 15:50:20 +0000 Subject: [PATCH] ignore whitespace in ldd tests --- tests/run-make/rust-lld-by-default/rmake.rs | 2 +- tests/run-make/rust-lld-custom-target/rmake.rs | 2 +- tests/run-make/rust-lld/rmake.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/run-make/rust-lld-by-default/rmake.rs b/tests/run-make/rust-lld-by-default/rmake.rs index b46988da50385..8ab16394a915a 100644 --- a/tests/run-make/rust-lld-by-default/rmake.rs +++ b/tests/run-make/rust-lld-by-default/rmake.rs @@ -39,5 +39,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())) } diff --git a/tests/run-make/rust-lld-custom-target/rmake.rs b/tests/run-make/rust-lld-custom-target/rmake.rs index 4eb8585746348..e6c4a321d0002 100644 --- a/tests/run-make/rust-lld-custom-target/rmake.rs +++ b/tests/run-make/rust-lld-custom-target/rmake.rs @@ -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())) } diff --git a/tests/run-make/rust-lld/rmake.rs b/tests/run-make/rust-lld/rmake.rs index e186bc700d3e2..a74e858045d4b 100644 --- a/tests/run-make/rust-lld/rmake.rs +++ b/tests/run-make/rust-lld/rmake.rs @@ -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())) }