Check padded length

This commit is contained in:
Bob Mottram 2016-11-21 18:17:19 +00:00
parent 1a4f56f444
commit 45a8e47395
1 changed files with 4 additions and 1 deletions

View File

@ -109,7 +109,10 @@ function remove_padding {
function run_tests {
pass="SuperSecretPassword"
padded=$(pad_string "$pass")
echo "|${padded}|"
if [ ${#padded} -ne 128 ]; then
echo $'Incorrect padded length'
exit 78352
fi
${PROJECT_NAME}-pass -u root -a tests -p "$pass"
returned_pass=$(${PROJECT_NAME}-pass -u root -a tests)
if [[ "$pass" != "$returned_pass" ]]; then