Add more tests to test script
This commit is contained in:
parent
da50aec4a2
commit
b3d2d92c81
4 changed files with 19 additions and 1 deletions
2
main.c
2
main.c
|
@ -42,6 +42,8 @@ usage(void)
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage: scrypt-genpass [-m MAXMEM] [-o MAXOPS] [-k KEYFILE] [-p PASS] <site>\n");
|
"usage: scrypt-genpass [-m MAXMEM] [-o MAXOPS] [-k KEYFILE] [-p PASS] <site>\n");
|
||||||
|
fprintf(stderr,
|
||||||
|
" scrypt-genpass -t\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
test/keyfile1.dat
Normal file
1
test/keyfile1.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
def
|
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
PROG=./scrypt-genpass
|
PROG=./scrypt-genpass
|
||||||
|
RESULTS=test/test_results.log
|
||||||
|
|
||||||
$PROG -t
|
$PROG -t > $RESULTS 2>&1
|
||||||
|
$PROG -h >> $RESULTS 2>&1
|
||||||
|
$PROG -p b a >> $RESULTS 2>&1
|
||||||
|
$PROG -k test/keyfile1.dat -p abc ghi >> $RESULTS 2>&1
|
||||||
|
|
||||||
|
diff $RESULTS test/test_results.reference
|
||||||
|
|
9
test/test_results.reference
Normal file
9
test/test_results.reference
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
All internal tests pass
|
||||||
|
usage: scrypt-genpass [-m MAXMEM] [-o MAXOPS] [-k KEYFILE] [-p PASS] <site>
|
||||||
|
scrypt-genpass -t
|
||||||
|
Master hex: 3e23e8160039594a33894f6564e1b1348bbd7a0088d42c4acb73eeaed59c009d
|
||||||
|
Site hex: ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb
|
||||||
|
Pass hex: 0160b45a147d0a0f5b6976a7ab698554a41c06c5f77cc9d77b06304265d1646fdc8e3119474748778ab3b68a39d0a67b3a92b41a8ddb45d4bb6ebec20a5f4a57
|
||||||
|
Master hex: bef57ec7f53a6d40beb640a780a639c83bc29ac8a9816f1fc6c5c6dcd93c4721
|
||||||
|
Site hex: 50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb
|
||||||
|
Pass hex: a46a99d8d0ed2388d48cc3ddd33efe0b635790176c4f84387c0b02b589d2db9703db2fa3d41d5ee1d670ba0ddd1cfd1520a0d1a7394db5ff5eaa8b290aa80ebd
|
Reference in a new issue