use proptest::prelude::*;
use proptest_semver::*;
mod common;
use common::subcommands::*;
use crate::common::common_cmd;
#[test]
fn cli_explain_invalid_input() {
let assert = common_cmd().arg(COMMAND_EXPLAIN).arg("a.b.c").assert();
assert
.append_context(COMMAND_EXPLAIN, "1 bad semver args")
.failure();
}
#[test]
fn cli_explain_basic_cases() {
let assert = common_cmd()
.arg(COMMAND_EXPLAIN)
.arg("0.1.2-rc.0.a.1.b+a.0.b.1")
.assert();
assert.append_context(COMMAND_EXPLAIN, "help").success();
}
proptest! {
#[test]
fn prop_explain(v in arb_version()) {
let assert = common_cmd().arg(COMMAND_EXPLAIN).arg(v.to_string()).assert();
assert.append_context(COMMAND_EXPLAIN, "property test").success();
}
}