immargs 0.1.4

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::args;

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

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