ignore whitespace in ldd tests

This commit is contained in:
lcnr 2024-05-24 15:50:20 +00:00
parent aa8f995b89
commit 8160974ce8
3 changed files with 3 additions and 3 deletions

View File

@ -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()))
}

View File

@ -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()))
}

View File

@ -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()))
}