immargs 0.1.1

No-hassle, on-the-spot, command line argument parser
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use immargs::Error;
use immargs::immargs;

#[test]
fn version() {
    immargs! {
        -v --version,
    }

    let result = ImmArgs::try_from(["test", "-v"]);
    let version = format!("{} {}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
    assert!(matches!(result, Err(Error::Version { message}) if message == version ));
}