diff options
author | Daniel Mueller <deso@posteo.net> | 2019-01-14 11:06:07 -0800 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2019-01-14 11:06:07 -0800 |
commit | 3399c44a72fa52113d3935c2040765a9d5e42f2c (patch) | |
tree | 6482a7bd60d3787f265b7cc8e966ad99c26423fb /nitrocli/src/args.rs | |
parent | d8e4f651a453a37345153a3dfc8593f2419b08af (diff) | |
download | nitrocli-3399c44a72fa52113d3935c2040765a9d5e42f2c.tar.gz nitrocli-3399c44a72fa52113d3935c2040765a9d5e42f2c.tar.bz2 |
Add tests for otp command
This change adds a set of tests for the otp command. We cover some
variants of the status, set, get, and clear. Testing all the possible
combinations is out of scope and so only a more or less arbitrary subset
of arguments was chosen.
Diffstat (limited to 'nitrocli/src/args.rs')
-rw-r--r-- | nitrocli/src/args.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nitrocli/src/args.rs b/nitrocli/src/args.rs index b15ca65..789001e 100644 --- a/nitrocli/src/args.rs +++ b/nitrocli/src/args.rs @@ -463,7 +463,7 @@ fn otp_get(ctx: &mut ExecCtx<'_>, args: Vec<String>) -> Result<()> { let _ = parser.refer(&mut algorithm).add_option( &["-a", "--algorithm"], argparse::Store, - "The OTP algorithm to use (hotp|totp)", + "The OTP algorithm to use (hotp|totp, default: totp)", ); let _ = parser.refer(&mut time).add_option( &["-t", "--time"], @@ -497,7 +497,7 @@ pub fn otp_set(ctx: &mut ExecCtx<'_>, args: Vec<String>) -> Result<()> { let _ = parser.refer(&mut algorithm).add_option( &["-a", "--algorithm"], argparse::Store, - "The OTP algorithm to use (hotp or totp, default: totp)", + "The OTP algorithm to use (hotp|totp, default: totp)", ); let _ = parser.refer(&mut name).required().add_argument( "name", @@ -577,7 +577,7 @@ fn otp_clear(ctx: &mut ExecCtx<'_>, args: Vec<String>) -> Result<()> { let _ = parser.refer(&mut algorithm).add_option( &["-a", "--algorithm"], argparse::Store, - "The OTP algorithm to use (hotp|totp)", + "The OTP algorithm to use (hotp|totp, default: totp)", ); parse(ctx, &parser, args)?; drop(parser); |