clap/clap_generate_fig/tests/generate_completions.rs

19 lines
500 B
Rust
Raw Normal View History

use clap::{App, Arg};
use clap_generate::generate;
use clap_generate_fig::Fig;
use std::io;
#[test]
fn generate_completions() {
let mut app = App::new("test_app")
.arg(Arg::new("config").short('c').global(true))
.arg(Arg::new("v").short('v').conflicts_with("config"))
.subcommand(
App::new("test")
.about("Subcommand")
.arg(Arg::new("debug").short('d')),
);
2021-10-12 12:57:26 +00:00
generate(Fig, &mut app, "test_app", &mut io::sink());
}