diff options
author | Rich Salz <rsalz@openssl.org> | 2015-04-10 10:06:17 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-04-10 10:06:17 -0400 |
commit | 30f54ad295d58ff8c6d28c1fd612d23c2c343d19 (patch) | |
tree | f740e39be9698b13d0f0a088903b236988aeb075 /test/testenc | |
parent | 2cfdfe0918f03f8323c9523a2beb2b363ae86ca7 (diff) |
test script cleanup
Removed commented-out tests
Standardize on doing
cmd ... || exit 1
instead of
cmd ...
if [ $? != 0] ; then
exit 1
fi
where that if statement has ben one, three, or four lines, variously.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/testenc')
-rw-r--r-- | test/testenc | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/test/testenc b/test/testenc index 6ca9caddc1..3a07398eab 100644 --- a/test/testenc +++ b/test/testenc @@ -11,46 +11,27 @@ cat $testsrc >$test; echo cat $cmd enc < $test > $test.cipher $cmd enc < $test.cipher >$test.clear -cmp $test $test.clear -if [ $? != 0 ] -then - exit 1 -else - /bin/rm $test.cipher $test.clear -fi +cmp $test $test.clear || exit 1 +/bin/rm $test.cipher $test.clear + echo base64 $cmd enc -a -e < $test > $test.cipher $cmd enc -a -d < $test.cipher >$test.clear -cmp $test $test.clear -if [ $? != 0 ] -then - exit 1 -else - /bin/rm $test.cipher $test.clear -fi +cmp $test $test.clear || exit 1 +/bin/rm $test.cipher $test.clear for i in `$cmd list-cipher-commands` do echo $i $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher $cmd $i -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear - cmp $test $test.$i.clear - if [ $? != 0 ] - then - exit 1 - else - /bin/rm $test.$i.cipher $test.$i.clear - fi + cmp $test $test.$i.clear || exit 1 + /bin/rm $test.$i.cipher $test.$i.clear echo $i base64 $cmd $i -bufsize 113 -a -e -k test < $test > $test.$i.cipher $cmd $i -bufsize 157 -a -d -k test < $test.$i.cipher >$test.$i.clear - cmp $test $test.$i.clear - if [ $? != 0 ] - then - exit 1 - else - /bin/rm $test.$i.cipher $test.$i.clear - fi + cmp $test $test.$i.clear || exit 1 + /bin/rm $test.$i.cipher $test.$i.clear done rm -f $test |