use clap::Parser;
#[derive(Parser, Debug)]
#[command(author, version, about = "Compiles a novel manuscript from a YAML configuration file into a single .docx file.", long_about = None)]
pub struct Args {
pub config_file: String,
pub output_dir: String,
#[arg(long)]
pub blind: bool,
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_args_parsing() {
let args = Args::try_parse_from(["mdmf", "config.yaml", "out_dir"]);
assert!(args.is_ok());
let args = args.unwrap();
assert_eq!(args.config_file, "config.yaml");
assert_eq!(args.output_dir, "out_dir");
}
#[test]
fn test_missing_args() {
let args = Args::try_parse_from(["mdmf", "config.yaml"]);
assert!(args.is_err());
}
}