about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xtest/test.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test.sh b/test/test.sh
index 51b53de4..9e3c882e 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -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"