Changeset 1587 for zzuf/trunk/test


Ignore:
Timestamp:
Jan 6, 2007, 9:24:54 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Fixed the head call in the testsuite so that it works on OS X.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/test/testsuite.sh

    r1586 r1587  
    1919    CMD="$2"
    2020    ALIAS="$3"
    21     echo -n " $(echo "$ALIAS .............." | cut -b1-15) "
     21    echo -n " $(echo "$ALIAS .............." | cut -b1-18) "
    2222    NEWMD5="$(eval "$ZZUF $ZZOPTS $CMD" 2>/dev/null | md5sum | cut -b1-32)"
    2323    if [ -z "$MD5" ]; then
     
    5555TESTED=0
    5656
    57 echo "Creating test files"
     57echo "*** running zzuf test suite ***"
     58echo "*** creating test files ***"
    5859create
    59 echo "Using seed $seed"
     60echo "*** using seed $seed ***"
    6061echo ""
    6162
     
    6667          *text*) ZZOPTS="$ZZOPTS -P '\n'" ;;
    6768        esac
    68         echo "Testing zzuf on $file, ratio $r:"
     69        echo "*** file $file, ratio $r ***"
    6970        OK=1
    7071        MD5=""
     
    7677            # they put a newline at the end of their input if it was not there
    7778            # initially. (Linux sed doesn't, but OS X sed does.)
    78             check "$ZZOPTS" "head -- -n -0 $file" "head -n -0"
    79             check "$ZZOPTS" "-i head -- -n -0 < $file" "|head -n -0"
     79            check "$ZZOPTS" "head -- -n 9999 $file" "head -n 9999"
     80            check "$ZZOPTS" "-i head -- -n 9999 < $file" "|head -n 9999"
    8081            check "$ZZOPTS" "tail -- -n +1 $file" "tail -n +1"
    8182            check "$ZZOPTS" "-i tail -- -n +1 < $file" "|tail -n +1"
     
    104105
    105106if [ "$FAILED" != 0 ]; then
    106     echo "$FAILED tests failed out of $TESTED."
     107    echo "*** $FAILED tests failed out of $TESTED ***"
    107108    cleanup
    108109    exit 1
    109110fi
    110 echo "All $TESTED tests OK."
     111echo "*** all $TESTED tests OK ***"
    111112
    112113cleanup
Note: See TracChangeset for help on using the changeset viewer.