clean_dev_dirs/config/
scan.rs1use std::path::PathBuf;
7
8#[derive(Clone, Debug)]
13pub struct ScanOptions {
14 pub verbose: bool,
16
17 pub threads: usize,
19
20 pub skip: Vec<PathBuf>,
22
23 pub max_depth: Option<usize>,
25}
26
27#[cfg(test)]
28mod tests {
29 use super::*;
30
31 #[test]
32 fn test_scan_options_creation() {
33 let scan_opts = ScanOptions {
34 verbose: true,
35 threads: 4,
36 skip: vec![PathBuf::from("test")],
37 max_depth: None,
38 };
39
40 assert!(scan_opts.verbose);
41 assert_eq!(scan_opts.threads, 4);
42 assert_eq!(scan_opts.skip.len(), 1);
43 }
44
45 #[test]
46 fn test_scan_options_clone() {
47 let original = ScanOptions {
48 verbose: true,
49 threads: 4,
50 skip: vec![PathBuf::from("test")],
51 max_depth: None,
52 };
53 let cloned = original.clone();
54
55 assert_eq!(original.verbose, cloned.verbose);
56 assert_eq!(original.threads, cloned.threads);
57 assert_eq!(original.skip, cloned.skip);
58 }
59}