#[structopt(long="--pause", default_value="0ms")]
pub pause: humantime::Duration,
+ #[structopt(flatten)]
+ pub tests: WantedTests,
+}
+
+#[derive(Clone,Debug)]
+#[derive(StructOpt)]
+pub struct WantedTests {
pub tests: Vec<String>,
}
pub fn want_test(&mut self, tname: &str) -> bool {
self.found_tests.insert(tname.to_owned());
let y =
- self.opts.tests.is_empty() ||
- self.opts.tests.iter().any(|s| s==tname);
+ self.opts.tests.tests.is_empty() ||
+ self.opts.tests.tests.iter().any(|s| s==tname);
y
}
.context("screenshots, in Setup::drop")
.just_warn();
- let missing_tests = self.opts.tests.iter().cloned()
+ let missing_tests = self.opts.tests.tests.iter().cloned()
.filter(|s| !self.found_tests.contains(s))
.collect::<Vec<_>>();