Changeset 2548 for zzuf/trunk/test


Ignore:
Timestamp:
Jul 16, 2008, 10:36:14 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Add a unit test for MD5 hashes.
Location:
zzuf/trunk/test
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/test/Makefile.am

    r2545 r2548  
    11
    2 EXTRA_DIST = rng utils file-00 file-ff file-random file-text
     2EXTRA_DIST = $(TESTS) file-00 file-ff file-random file-text
    33
    44noinst_PROGRAMS = zzcat zzero bug-overflow bug-memory bug-div0
    55
    6 TESTS = check-rng check-overflow check-memory check-div0 check-utils
     6TESTS = check-md5 check-overflow check-memory check-div0 check-rng check-utils
    77
    8 zzcat_SOURCES = zzcat.c
    9 
    10 zzero_SOURCES = zzero.c
    11 
  • zzuf/trunk/test/check-div0

    r2545 r2548  
    2323echo "*** bug-div0 < /file-00"
    2424if ! $PROGRAM < "$DIR/file-00"; then
    25     echo "unexpected exit status $?"
     25    echo " unexpected exit status $?"
    2626    FAILED="$(($FAILED + 1))"
    2727else
    28     echo "*** test OK ***"
     28    echo " OK"
    2929fi
    3030TESTED="$(($TESTED + 1))"
     
    3232echo "*** zzuf -qi -r0 bug-div0 < /file-00"
    3333if ! "$ZZUF" -r0 -qi "$PROGRAM" < "$DIR/file-00"; then
    34     echo "unexpected exit status $?"
     34    echo " unexpected exit status $?"
    3535    FAILED="$(($FAILED + 1))"
    3636else
    37     echo "*** test OK ***"
     37    echo " OK"
    3838fi
    3939TESTED="$(($TESTED + 1))"
     
    4141echo "*** zzuf -qi bug-div0 < file-00"
    4242if "$ZZUF" -qi "$PROGRAM" < "$DIR/file-00"; then
    43     echo "unexpected exit status $?"
     43    echo " unexpected exit status $?"
    4444    FAILED="$(($FAILED + 1))"
    4545else
    46     echo "*** test OK ***"
     46    echo " OK"
    4747fi
    4848TESTED="$(($TESTED + 1))"
    4949
    50 echo ""
    5150if [ "$FAILED" != 0 ]; then
    5251    echo "*** $FAILED tests failed out of $TESTED ***"
  • zzuf/trunk/test/check-memory

    r2545 r2548  
    2323echo "*** bug-memory < /file-00"
    2424if ! $PROGRAM < "$DIR/file-00"; then
    25     echo "unexpected exit status $?"
     25    echo " unexpected exit status $?"
    2626    FAILED="$(($FAILED + 1))"
    2727else
    28     echo "*** test OK ***"
     28    echo " OK"
    2929fi
    3030TESTED="$(($TESTED + 1))"
     
    3232echo "*** zzuf -qi -r0 bug-memory < /file-00"
    3333if ! "$ZZUF" -r0 -qi "$PROGRAM" < "$DIR/file-00"; then
    34     echo "unexpected exit status $?"
     34    echo " unexpected exit status $?"
    3535    FAILED="$(($FAILED + 1))"
    3636else
    37     echo "*** test OK ***"
     37    echo " OK"
    3838fi
    3939TESTED="$(($TESTED + 1))"
     
    4141echo "*** zzuf -qi bug-memory < file-00"
    4242if "$ZZUF" -M 256 -qi "$PROGRAM" < "$DIR/file-00"; then
    43     echo "unexpected exit status $?"
     43    echo " unexpected exit status $?"
    4444    FAILED="$(($FAILED + 1))"
    4545else
    46     echo "*** test OK ***"
     46    echo " OK"
    4747fi
    4848TESTED="$(($TESTED + 1))"
    4949
    50 echo ""
    5150if [ "$FAILED" != 0 ]; then
    5251    echo "*** $FAILED tests failed out of $TESTED ***"
  • zzuf/trunk/test/check-overflow

    r2545 r2548  
    2323echo "*** bug-overflow < /file-00"
    2424if ! $PROGRAM < "$DIR/file-00"; then
    25     echo "unexpected exit status $?"
     25    echo " unexpected exit status $?"
    2626    FAILED="$(($FAILED + 1))"
    2727else
    28     echo "*** test OK ***"
     28    echo " OK"
    2929fi
    3030TESTED="$(($TESTED + 1))"
     
    3232echo "*** zzuf -qi -r0 bug-overflow < /file-00"
    3333if ! "$ZZUF" -r0 -qi "$PROGRAM" < "$DIR/file-00"; then
    34     echo "unexpected exit status $?"
     34    echo " unexpected exit status $?"
    3535    FAILED="$(($FAILED + 1))"
    3636else
    37     echo "*** test OK ***"
     37    echo " OK"
    3838fi
    3939TESTED="$(($TESTED + 1))"
     
    4141echo "*** zzuf -qi bug-overflow < file-00"
    4242if "$ZZUF" -qi "$PROGRAM" < "$DIR/file-00"; then
    43     echo "unexpected exit status $?"
     43    echo " unexpected exit status $?"
    4444    FAILED="$(($FAILED + 1))"
    4545else
    46     echo "*** test OK ***"
     46    echo " OK"
    4747fi
    4848TESTED="$(($TESTED + 1))"
    4949
    50 echo ""
    5150if [ "$FAILED" != 0 ]; then
    5251    echo "*** $FAILED tests failed out of $TESTED ***"
  • zzuf/trunk/test/check-rng

    r2545 r2548  
    6767checkflip 0.1  15205967
    6868
    69 echo ""
    7069if [ "$FAILED" != 0 ]; then
    7170    echo "*** $FAILED tests failed out of $TESTED ***"
  • zzuf/trunk/test/check-utils

    r2545 r2548  
    117117checkutils 10.0
    118118
    119 echo ""
    120119if [ "$FAILED" != 0 ]; then
    121120    echo "*** $FAILED tests failed out of $TESTED ***"
Note: See TracChangeset for help on using the changeset viewer.