summaryrefslogtreecommitdiff
path: root/src/tests/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/config.rs')
-rw-r--r--src/tests/config.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tests/config.rs b/src/tests/config.rs
index 728fdbd..fa311d5 100644
--- a/src/tests/config.rs
+++ b/src/tests/config.rs
@@ -19,6 +19,23 @@
use super::*;
+#[test]
+fn mutually_exclusive_set_options() {
+ fn test(option1: &str, option2: &str) {
+ let (rc, out, err) = Nitrocli::new().run(&["config", "set", option1, option2]);
+
+ assert_ne!(rc, 0);
+ assert_eq!(out, b"");
+
+ let err = String::from_utf8(err).unwrap();
+ assert!(err.contains("cannot be used with"), err);
+ }
+
+ test("-c", "-C");
+ test("-o", "-O");
+ test("-s", "-S");
+}
+
#[test_device]
fn get(model: nitrokey::Model) -> crate::Result<()> {
let re = regex::Regex::new(