Improve test output when file command output does not match expected regex

This commit is contained in:
Dave Rolsky 2025-04-12 08:10:08 -05:00
parent 56f0ba980e
commit 329eb5fa43
No known key found for this signature in database

View File

@ -127,7 +127,7 @@ fn check_binary(bin_path: &PathBuf, expect_file_re: Option<&str>, expect_strippe
let re = Regex::new(file_re).expect("Invalid regex"); let re = Regex::new(file_re).expect("Invalid regex");
assert!( assert!(
re.is_match(&file_output), re.is_match(&file_output),
"`file` output for {} matches expected output", "`file` output for {} matches `{file_re}`",
bin_path.display(), bin_path.display(),
); );
} }