use std::path::PathBuf;
#[derive(Clone, Debug)]
pub struct ScanOptions {
pub verbose: bool,
pub threads: usize,
pub skip: Vec<PathBuf>,
pub max_depth: Option<usize>,
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_scan_options_creation() {
let scan_opts = ScanOptions {
verbose: true,
threads: 4,
skip: vec![PathBuf::from("test")],
max_depth: None,
};
assert!(scan_opts.verbose);
assert_eq!(scan_opts.threads, 4);
assert_eq!(scan_opts.skip.len(), 1);
}
#[test]
fn test_scan_options_clone() {
let original = ScanOptions {
verbose: true,
threads: 4,
skip: vec![PathBuf::from("test")],
max_depth: None,
};
let cloned = original.clone();
assert_eq!(original.verbose, cloned.verbose);
assert_eq!(original.threads, cloned.threads);
assert_eq!(original.skip, cloned.skip);
}
}