diff --git a/src/unix/ctl_iter.rs b/src/unix/ctl_iter.rs index 9bc47a3..8361b94 100644 --- a/src/unix/ctl_iter.rs +++ b/src/unix/ctl_iter.rs @@ -88,58 +88,4 @@ mod tests { println!("{:?}", ctl.name()); } } - - #[test] - fn ctl_iter_below_compare_outputs() { - let output = std::process::Command::new("sysctl") - .arg("security") - .output() - .expect("failed to execute process"); - let expected = String::from_utf8_lossy(&output.stdout); - - let security = super::Ctl::new("security").expect("could not get security node"); - - let ctls = super::CtlIter::below(security); - let mut actual: Vec = vec!["".to_string()]; - - for ctl in ctls { - let ctl = match ctl { - Err(_) => { - continue; - } - Ok(s) => s, - }; - - let name = match ctl.name() { - Ok(s) => s, - Err(_) => { - continue; - } - }; - - match ctl.value_type().expect("could not get value type") { - crate::CtlType::None => { - continue; - } - crate::CtlType::Struct => { - continue; - } - crate::CtlType::Node => { - continue; - } - #[cfg(not(target_os = "macos"))] - crate::CtlType::Temperature => { - continue; - } - _ => {} - }; - - actual.push(format!( - "{}: {}", - name, - ctl.value_string().expect("could not get value as string") - )); - } - assert_eq!(actual.join("\n").trim(), expected.trim()); - } }