clean_dev_dirs/config/
execution.rs1#[derive(Clone)]
11#[allow(clippy::struct_excessive_bools)]
12pub struct ExecutionOptions {
13 pub dry_run: bool,
15
16 pub interactive: bool,
18
19 pub keep_executables: bool,
21
22 pub use_trash: bool,
27}
28
29#[cfg(test)]
30mod tests {
31 use super::*;
32
33 #[test]
34 fn test_execution_options_creation() {
35 let exec_opts = ExecutionOptions {
36 dry_run: true,
37 interactive: false,
38 keep_executables: false,
39 use_trash: false,
40 };
41
42 assert!(exec_opts.dry_run);
43 assert!(!exec_opts.interactive);
44 assert!(!exec_opts.keep_executables);
45 assert!(!exec_opts.use_trash);
46 }
47
48 #[test]
49 fn test_execution_options_clone() {
50 let original = ExecutionOptions {
51 dry_run: true,
52 interactive: false,
53 keep_executables: true,
54 use_trash: true,
55 };
56 let cloned = original.clone();
57
58 assert_eq!(original.dry_run, cloned.dry_run);
59 assert_eq!(original.interactive, cloned.interactive);
60 assert_eq!(original.keep_executables, cloned.keep_executables);
61 assert_eq!(original.use_trash, cloned.use_trash);
62 }
63}