diff --git a/rust/src/cliwrap/rpm.rs b/rust/src/cliwrap/rpm.rs index c6ed5901ca..3332f76c99 100644 --- a/rust/src/cliwrap/rpm.rs +++ b/rust/src/cliwrap/rpm.rs @@ -19,6 +19,12 @@ fn new_rpm_app() -> Command { .long("version") .action(clap::ArgAction::Version), ) + .arg( + Arg::new("eval") + .long("eval") + .short('E') + .action(clap::ArgAction::Set), + ) .arg( Arg::new("package") .help("package") @@ -130,6 +136,19 @@ mod tests { Ok(()) } + #[test] + fn test_eval() -> Result<()> { + assert_eq!( + disposition(SystemHostType::OstreeHost, &["-E", "%{_target_cpu}"])?, + RunDisposition::Ok + ); + assert_eq!( + disposition(SystemHostType::OstreeHost, &["--eval=%{_target_cpu}}"])?, + RunDisposition::Ok + ); + Ok(()) + } + #[test] fn test_query_file() -> Result<()> { assert_eq!(