#[derive(Clone, Debug)]
#[allow(clippy::struct_excessive_bools)]
pub struct ExecutionOptions {
pub dry_run: bool,
pub interactive: bool,
pub keep_executables: bool,
pub use_trash: bool,
pub yes: bool,
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_execution_options_creation() {
let exec_opts = ExecutionOptions {
dry_run: true,
interactive: false,
keep_executables: false,
use_trash: false,
yes: false,
};
assert!(exec_opts.dry_run);
assert!(!exec_opts.interactive);
assert!(!exec_opts.keep_executables);
assert!(!exec_opts.use_trash);
}
#[test]
fn test_execution_options_clone() {
let original = ExecutionOptions {
dry_run: true,
interactive: false,
keep_executables: true,
use_trash: true,
yes: false,
};
let cloned = original.clone();
assert_eq!(original.dry_run, cloned.dry_run);
assert_eq!(original.interactive, cloned.interactive);
assert_eq!(original.keep_executables, cloned.keep_executables);
assert_eq!(original.use_trash, cloned.use_trash);
}
}