MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / assert_output

Function assert_output

rust/tests/common.rs:111–132  ·  view source on GitHub ↗
(
    cmd: &mut Command,
    assert_result: AssertResult,
    expected_output: Vec<&str>,
    error_code: i32,
)

Source from the content-addressed store, hash-verified

109
110#[allow(dead_code)]
111pub fn assert_output(
112 cmd: &mut Command,
113 assert_result: AssertResult,
114 expected_output: Vec<&str>,
115 error_code: i32,
116) {
117 if assert_result.is_ok() {
118 let stdout = &cmd.unwrap().stdout;
119 let output = std::str::from_utf8(stdout).unwrap();
120 expected_output
121 .iter()
122 .for_each(|o| assert!(output.contains(o)));
123 } else {
124 assert!(
125 assert_result
126 .err()
127 .unwrap()
128 .to_string()
129 .contains(&error_code.to_string())
130 );
131 }
132}
133
134#[allow(dead_code)]
135pub fn is_linux_arm64() -> bool {

Calls

no outgoing calls

Tested by

no test coverage detected