mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
Tests: Refactor: Neaten
This commit is contained in:
@@ -56,11 +56,9 @@ fn run_dust_with<T: AsRef<OsStr>>(params: Vec<T>) -> String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn check_dust_output(output: String, func: fn() -> Vec<String>) {
|
fn check_dust_output(output: String, func: fn() -> Vec<String>) {
|
||||||
let mut we_match = false;
|
assert!(func()
|
||||||
for mo in func() {
|
.iter()
|
||||||
we_match = we_match || output.contains(&mo);
|
.fold(false, |sum, i| sum || output.contains(i)));
|
||||||
}
|
|
||||||
assert!(we_match);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable
|
// "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable
|
||||||
|
|||||||
Reference in New Issue
Block a user