aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-09-29 19:18:56 +0200
committerRobin Krahl <robin.krahl@ireas.org>2020-10-02 11:58:21 +0200
commita6538455de33f6d09dfa4011fbbdaa6e59b132f4 (patch)
tree7f7fcfd2150a56f3c88b2371b63486090e22d207 /src/tests
parent458d87d2a7fb31beea3e965bd77d7d0ce25eb4b4 (diff)
downloadnitrocli-a6538455de33f6d09dfa4011fbbdaa6e59b132f4.tar.gz
nitrocli-a6538455de33f6d09dfa4011fbbdaa6e59b132f4.tar.bz2
Rename numlock, capslock, scrollock optionsnitrokey-v0.8.0
This patch renames the options for the config set command: --numlock ==> --num-lock --capslock ==> --caps-lock --scrolllock ==> --scroll-lock --no-numlock ==> --no-num-lock --no-capslock ==> --no-caps-lock --no-scrolllock ==> --no-scroll-lock The original naming was based on a typo in nitrokey-rs (scrollock vs. scrolllock). Also, the typical spelling for the keys is Num Lock, Caps Lock and Scroll Lock, so using a hyphen is a more natural.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/config.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tests/config.rs b/src/tests/config.rs
index babd32c..b3d27de 100644
--- a/src/tests/config.rs
+++ b/src/tests/config.rs
@@ -26,9 +26,9 @@ fn mutually_exclusive_set_options() {
fn get(model: nitrokey::Model) -> anyhow::Result<()> {
let re = regex::Regex::new(
r#"^Config:
- numlock binding: (not set|\d+)
- capslock binding: (not set|\d+)
- scrollock binding: (not set|\d+)
+ num lock binding: (not set|\d+)
+ caps lock binding: (not set|\d+)
+ scroll lock binding: (not set|\d+)
require user PIN for OTP: (true|false)
$"#,
)
@@ -44,12 +44,12 @@ $"#,
fn set_wrong_usage(model: nitrokey::Model) {
let err = Nitrocli::new()
.model(model)
- .handle(&["config", "set", "--numlock", "2", "-N"])
+ .handle(&["config", "set", "--num-lock", "2", "-N"])
.unwrap_err()
.to_string();
assert!(
- err.contains("The argument '--numlock <numlock>' cannot be used with '--no-numlock'"),
+ err.contains("The argument '--num-lock <num-lock>' cannot be used with '--no-num-lock'"),
err,
);
}
@@ -61,9 +61,9 @@ fn set_get(model: nitrokey::Model) -> anyhow::Result<()> {
let re = regex::Regex::new(
r#"^Config:
- numlock binding: not set
- capslock binding: 0
- scrollock binding: 1
+ num lock binding: not set
+ caps lock binding: 0
+ scroll lock binding: 1
require user PIN for OTP: (true|false)
$"#,
)