- Timestamp:
- Jan 6, 2007, 9:24:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/test/testsuite.sh
r1586 r1587 19 19 CMD="$2" 20 20 ALIAS="$3" 21 echo -n " $(echo "$ALIAS .............." | cut -b1-1 5) "21 echo -n " $(echo "$ALIAS .............." | cut -b1-18) " 22 22 NEWMD5="$(eval "$ZZUF $ZZOPTS $CMD" 2>/dev/null | md5sum | cut -b1-32)" 23 23 if [ -z "$MD5" ]; then … … 55 55 TESTED=0 56 56 57 echo "Creating test files" 57 echo "*** running zzuf test suite ***" 58 echo "*** creating test files ***" 58 59 create 59 echo " Using seed $seed"60 echo "*** using seed $seed ***" 60 61 echo "" 61 62 … … 66 67 *text*) ZZOPTS="$ZZOPTS -P '\n'" ;; 67 68 esac 68 echo " Testing zzuf on $file, ratio $r:"69 echo "*** file $file, ratio $r ***" 69 70 OK=1 70 71 MD5="" … … 76 77 # they put a newline at the end of their input if it was not there 77 78 # 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" 80 81 check "$ZZOPTS" "tail -- -n +1 $file" "tail -n +1" 81 82 check "$ZZOPTS" "-i tail -- -n +1 < $file" "|tail -n +1" … … 104 105 105 106 if [ "$FAILED" != 0 ]; then 106 echo " $FAILED tests failed out of $TESTED."107 echo "*** $FAILED tests failed out of $TESTED ***" 107 108 cleanup 108 109 exit 1 109 110 fi 110 echo " All $TESTED tests OK."111 echo "*** all $TESTED tests OK ***" 111 112 112 113 cleanup
Note: See TracChangeset
for help on using the changeset viewer.