invalid stdout_utf8 handling in run_make_support
This commit is contained in:
parent
689bb118ce
commit
dcaa17a661
@ -168,6 +168,12 @@ impl CompletedProcess {
|
|||||||
String::from_utf8(self.output.stdout.clone()).expect("stdout is not valid UTF-8")
|
String::from_utf8(self.output.stdout.clone()).expect("stdout is not valid UTF-8")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[must_use]
|
||||||
|
#[track_caller]
|
||||||
|
pub fn invalid_stdout_utf8(&self) -> String {
|
||||||
|
String::from_utf8_lossy(&self.output.stdout.clone()).to_string()
|
||||||
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn stderr_utf8(&self) -> String {
|
pub fn stderr_utf8(&self) -> String {
|
||||||
|
@ -142,7 +142,7 @@ fn main() {
|
|||||||
|
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
fn symbols_check(path: &str, symbol_check_type: SymbolCheckType, exists_once: bool) {
|
fn symbols_check(path: &str, symbol_check_type: SymbolCheckType, exists_once: bool) {
|
||||||
let out = llvm_readobj().arg("--dyn-symbols").input(path).run().stdout_utf8();
|
let out = llvm_readobj().arg("--dyn-symbols").input(path).run().invalid_stdout_utf8();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
out.lines()
|
out.lines()
|
||||||
.filter(|&line| !line.contains("__imp_") && has_symbol(line, symbol_check_type))
|
.filter(|&line| !line.contains("__imp_") && has_symbol(line, symbol_check_type))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user