diff --git a/Cargo.toml b/Cargo.toml index 8fda8cde..44cec1ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,13 +11,13 @@ keywords = [ "selinux" ] [build-dependencies] lalrpop = "0.19" -clap = { version = "3", features = ["derive"] } -clap_mangen = "0.1" +clap = { version = "4", features = ["derive"] } +clap_mangen = "0.2" [dependencies] atty = "0.2" backtrace = "0.3" -clap = { version = "3", features = ["derive"] } +clap = { version = "4", features = ["derive"] } codespan-reporting = "0.11" lalrpop-util = "0.19" regex = "1" diff --git a/src/bin/casc/args.rs b/src/bin/casc/args.rs index 62160ccf..3e6264cf 100644 --- a/src/bin/casc/args.rs +++ b/src/bin/casc/args.rs @@ -20,7 +20,7 @@ pub struct Args { #[clap(default_value = "out.cil", short, value_parser = clap::builder::ValueParser::new(parse_out_filename))] pub out_filename: String, /// Build the systems from the SYSTEM_NAMES list. "-s all" to build all defined systems. - #[clap(short, conflicts_with = "out-filename")] + #[clap(short, conflicts_with = "out_filename")] pub system_names: Vec, ///colorize the output. WHEN can be 'always', 'auto' (default), or 'never' #[clap(long, value_enum, id = "WHEN")] @@ -40,3 +40,14 @@ pub enum ColorArg { Auto, Never, } + +#[cfg(test)] +mod tests { + use super::*; + use clap::CommandFactory; + + #[test] + fn test_cli() { + Args::command().debug_assert(); + } +}