test update

use the 'newboth' command as well

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-06-18 13:14:32 +02:00
parent e085107119
commit a202f3ce99

View File

@ -52,9 +52,17 @@ fn simple() {
Ok("FOO2:BAR:OMG"), Ok("FOO2:BAR:OMG"),
); );
check_cli(&cli, &["newfoo", "foo", "--bar=b", "--maybe"], Ok("foo:b:[true]")); check_cli(&cli, &["newboth", "a", "b", "--maybe"], Ok("a:b:[true]"));
check_cli(&cli, &["newfoo", "foo", "--bar=b", "--maybe=false"], Ok("foo:b:[false]")); check_cli(
check_cli(&cli, &["newfoo", "foo", "--bar=b", "--maybe", "false"], Ok("foo:b:[false]")); &cli,
&["newboth", "a", "b", "--maybe=false"],
Ok("a:b:[false]"),
);
check_cli(
&cli,
&["newboth", "a", "b", "--maybe", "false"],
Ok("a:b:[false]"),
);
} }
fn check_cli(cli: &cli::App<Bytes>, args: &[&str], expect: Result<&str, &str>) { fn check_cli(cli: &cli::App<Bytes>, args: &[&str], expect: Result<&str, &str>) {