A test script for Linux
The following script can be used for barcode testing on Linux in a similar way to the test option in SoftekSDKDemo (using the same options):
echo “Test only with supplied options”
r=`./bardecode $*`
if test -n “$r”
then
echo “Found barcode: $r”
exit
fi
echo “Test: Small quiet zones around barcodes (-q 10)”
r=`./bardecode -q 10 $*`
if test -n “$r”
then
echo “Found barcode: $r”
exit
fi
echo “Test: Skewed barcodes (–DeskewMode 3)”
r=`./bardecode –DeskewMode 3 $*`
if test -n “$r”
then
echo “Found barcode: $r”
exit
fi
echo “Test: Noise Reduction and Despeckle (-N 10)”
r=`./bardecode -N 10 $*`
if test -n “$r”
then
echo “Found barcode: $r”
exit
fi
echo “Test: Short barcode values (–MinLength 1)”
r=`./bardecode –MinLength 1 $*`
if test -n “$r”
then
echo “Found barcode: $r”
exit
fi
echo “Test: Low hit counts (–PrefOccurrence 2)”
r=`./bardecode –PrefOccurrence 2 $*`
if test -n “$r”
then
echo “Found barcode: $r”
exit
fi
echo “Test: Less common barcodes (–ReadCode25ni 1 –ReadPatchCodes 1 –ReadCodabar 1 –ReadDatabar 1)”
r=`./bardecode –ReadCode25ni 1 –ReadPatchCodes 1 –ReadCodabar 1 –ReadDatabar 1 $*`
if test -n “$r”
then
echo “Found barcode: $r”
exit
fi