Add CLI test for Argon2 params
This commit is contained in:
parent
6c8a4013cc
commit
51f0a8b2fe
@ -29,5 +29,13 @@ fn files() -> io::Result<()> {
|
||||
assert_eq!(tmp_decrypted.read(&mut buff)?, PLAINTEXT.len());
|
||||
assert_eq!(buff, PLAINTEXT);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn argon2_params() -> io::Result<()> {
|
||||
Command::cargo_bin("doby").unwrap().arg("-i").arg("0").assert().stderr("Invalid argon2 params: time cost is too small\n");
|
||||
Command::cargo_bin("doby").unwrap().arg("-m").arg("0").assert().stderr("Invalid argon2 params: memory cost is too small\n");
|
||||
Command::cargo_bin("doby").unwrap().arg("-t").arg("0").assert().stderr("Invalid argon2 params: too few lanes\n");
|
||||
Ok(())
|
||||
}
|
Loading…
Reference in New Issue
Block a user