test shell syntax

Clint Adams schizo at debian.org
Thu Nov 21 22:01:05 CET 2002


test == isn't mandated by POSIX, but = and -eq are.

Index: tests/t.grftest
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/tests/t.grftest,v
retrieving revision 1.3
diff -u -r1.3 t.grftest
--- tests/t.grftest	21 Nov 2002 20:28:15 -0000	1.3
+++ tests/t.grftest	21 Nov 2002 20:55:21 -0000
@@ -17,7 +17,7 @@
 #			      outputs - known correct outputs
 #			      tests   - outputs of the individual tests
 
-if [ "$1" == "-v" ]; then
+if [ "$1" = "-v" ]; then
     verbose=1
 fi
 
@@ -82,7 +82,7 @@
 
 if test x$SUPPRESS_DELETE != x ; then rm -rf t.systest.d/cfg.?; fi
 
-if  [ "$verbose" == "1" ]; then
+if  [ "$verbose" -eq 1 ]; then
     diff -u -s outputs/$OUT tests/$OUT
 fi



More information about the bogofilter-dev mailing list