mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-15 04:21:22 +00:00
fix: improve test_random_8_char_string
This commit is contained in:
parent
1d871fbcc1
commit
9cffa8db9f
1 changed files with 8 additions and 6 deletions
|
|
@ -254,12 +254,14 @@ pub async fn decrypt_file_with_private_key_as_buffer<P: AsRef<Path>>(
|
|||
mod tests {
|
||||
#[test]
|
||||
fn test_random_8_char_string() {
|
||||
let s = super::random_8_char_string();
|
||||
// Is 8 chars long
|
||||
assert_eq!(s.len(), 8);
|
||||
// Does not contain possibly confusing characters
|
||||
assert!(!s.contains('0'));
|
||||
assert!(!s.contains('O'));
|
||||
for _ in 0..1000 {
|
||||
let s = super::random_8_char_string();
|
||||
// Is 8 chars long
|
||||
assert_eq!(s.len(), 8);
|
||||
// Does not contain possibly confusing characters
|
||||
assert!(!s.contains('0'));
|
||||
assert!(!s.contains('O'));
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
|
|
|||
Loading…
Reference in a new issue