From c682fd310b59c23d347729749c968a137cadcb26 Mon Sep 17 00:00:00 2001 From: StNicolay Date: Tue, 25 Jul 2023 02:22:29 +0300 Subject: [PATCH] Added a test that chars in passwords.rs must be ascii It was already implied but it might be useful if they will be changed --- cryptography/src/passwords.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cryptography/src/passwords.rs b/cryptography/src/passwords.rs index 0653bce..ada5ce7 100644 --- a/cryptography/src/passwords.rs +++ b/cryptography/src/passwords.rs @@ -95,3 +95,13 @@ pub fn check_master_pass(password: &str) -> PasswordValidity { flags } + +#[cfg(test)] +mod tests { + use crate::passwords::CHARS; + + #[test] + fn chars_must_be_ascii() { + assert!(CHARS.is_ascii()) + } +}