diff options
Diffstat (limited to 'mingling_picker/test/src')
| -rw-r--r-- | mingling_picker/test/src/lib.rs | 8 | ||||
| -rw-r--r-- | mingling_picker/test/src/test.rs | 11 |
2 files changed, 19 insertions, 0 deletions
diff --git a/mingling_picker/test/src/lib.rs b/mingling_picker/test/src/lib.rs new file mode 100644 index 0000000..9bc0560 --- /dev/null +++ b/mingling_picker/test/src/lib.rs @@ -0,0 +1,8 @@ +// Using `assert_eq!(x, true)` is clearer than `assert!(x)` for expressing expected values +// +// BECAUSE `assert!` only checks if the boolean value is true, +// while `assert_eq!` explicitly shows the expected value +#![allow(clippy::bool_assert_comparison)] + +#[cfg(test)] +mod test; diff --git a/mingling_picker/test/src/test.rs b/mingling_picker/test/src/test.rs new file mode 100644 index 0000000..20b07ab --- /dev/null +++ b/mingling_picker/test/src/test.rs @@ -0,0 +1,11 @@ +use mingling_picker::{IntoPicker, macros::flag}; + +#[test] +fn test_picker_pipeline() { + let args = vec!["--flag"]; + let parsed = args + .with_route::<String>() + .pick(&flag![flag: bool]) + .unwrap(); + assert_eq!(parsed, true); +} |
