fix to "test script cleanup"
authorRich Salz <rsalz@openssl.org>
Fri, 10 Apr 2015 15:37:53 +0000 (11:37 -0400)
committerRich Salz <rsalz@openssl.org>
Fri, 10 Apr 2015 15:40:25 +0000 (11:40 -0400)
Fix commit 30f54ad295d58ff8c6d28c1fd612d23c2c343d19 which used
non-portable syntax for checking exit status.

Reviewed-by: Matt Caswell <matt@openssl.org>
test/testca

index 8961cf8448eba18ae6b61c938a312f49004c267a..d4d01597260dd2d7ba7d4ecb410e09480f24b591 100644 (file)
@@ -17,11 +17,11 @@ export OPENSSL
 
 /bin/rm -fr demoCA
 
 
 /bin/rm -fr demoCA
 
-# Could do '...CA.pl -newca || exot 1 << EOF
+# Could do '...CA.pl -newca <<EOF || exit 1
 # EOF' but that seems too obscure to me. :)
 OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca <<EOF
 EOF
 # EOF' but that seems too obscure to me. :)
 OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca <<EOF
 EOF
-[ $? == 0 ] || exit 1
+[ $? -eq 0 ] || exit 1
 
 SSLEAY_CONFIG="-config Uss.cnf"
 export SSLEAY_CONFIG
 
 SSLEAY_CONFIG="-config Uss.cnf"
 export SSLEAY_CONFIG
@@ -35,7 +35,7 @@ $PERL ../apps/CA.pl -sign  <<EOF
 y
 y
 EOF
 y
 y
 EOF
-[ $? == 0 ] || exit 1
+[ $? -eq 0 ] || exit 1
 
 
 $PERL ../apps/CA.pl -verify newcert.pem || exit 1
 
 
 $PERL ../apps/CA.pl -verify newcert.pem || exit 1