NetBSDs wc -l prints spaces before the number, so string test
failed -> use pattern matching with "case" instead.
@@ -152,11 +152,12 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" && {
mkdir -p in2
../afl-cmin -i in -o in2 -- ./test-instr.plain > /dev/null 2>&1
CNT=`ls in2/ | wc -l`
- test "$CNT" = 1 && $ECHO "$GREEN[+] afl-cmin correctly minimized testcase numbers"
- test "$CNT" = 1 || {
- $ECHO "$RED[!] afl-cmin did not correctly minimize testcase numbers"
+ case "$CNT" in
+1| *1) $ECHO "$GREEN[+] afl-cmin correctly minimized testcase numbers" ;;
+*) $ECHO "$RED[!] afl-cmin did not correctly minimize testcase numbers"
CODE=1
- }
+ ;;
+ esac
../afl-tmin -m200 -i in/in2 -o in2/in2 -- ./test-instr.plain > /dev/null 2>&1
SIZE=`ls -l in2/in2 2> /dev/null | awk '{print$5}'`
test "$SIZE" = 1 && $ECHO "$GREEN[+] afl-tmin correctly minimized the testcase"
