clap/clap_complete_fig/tests/generate_completions.rs
2022-02-14 15:55:56 -06:00

18 lines
512 B
Rust

use clap::{Arg, Command};
use clap_complete::generate;
use clap_complete_fig::Fig;
use std::io;
#[test]
fn generate_completions() {
let mut cmd = Command::new("test_app")
.arg(Arg::new("config").short('c').global(true))
.arg(Arg::new("v").short('v').conflicts_with("config"))
.subcommand(
Command::new("test")
.about("Subcommand")
.arg(Arg::new("debug").short('d')),
);
generate(Fig, &mut cmd, "test_app", &mut io::sink());
}