Add CLI test for Argon2 params

This commit is contained in:
Matéo Duparc 2021-07-04 16:28:26 +02:00
parent 6c8a4013cc
commit 51f0a8b2fe
Signed by: hardcoresushi
GPG Key ID: 007F84120107191E
1 changed files with 8 additions and 0 deletions

View File

@ -29,5 +29,13 @@ fn files() -> io::Result<()> {
assert_eq!( buff)?, PLAINTEXT.len());
assert_eq!(buff, PLAINTEXT);
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");