We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad0a01d commit 102b1d6Copy full SHA for 102b1d6
src/password_manager/generate.rs
@@ -77,4 +77,22 @@ pub fn main(command: &ArgMatches) {
77
}
78
79
displaylib::passwords::display_one(_password);
80
+}
81
+
82
83
+#[cfg(test)]
84
+mod tests {
85
+ #[test]
86
+ fn generate_password() {
87
+ let mut password = super::generate(
88
+ 512,
89
+ super::utilities::PasswordSample::Ascii
90
+ );
91
+ assert_eq!(password.len(), 512, "ASCII password length is NOT 512!!");
92
+ password = super::generate(
93
+ 192,
94
+ super::utilities::PasswordSample::Hex
95
96
+ assert_eq!(password.len(), 192, "HEX password length is NOT 192!!");
97
+ }
98
0 commit comments