Changeset 1526 for zzuf/trunk/test
- Timestamp:
- Dec 29, 2006, 6:22:11 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/test/testsuite.sh
r1521 r1526 35 35 rm -f /tmp/zzuf-random-$$ 36 36 rm -f /tmp/zzuf-text-$$ 37 echo "Temporary files removed." 38 else 39 echo "Files preserved:" 40 echo " /tmp/zzuf-zero-$$" 41 echo " /tmp/zzuf-random-$$" 42 echo " /tmp/zzuf-text-$$" 37 43 fi 38 44 } 39 45 40 trap "echo ''; echo ' Aborted.'; cleanup; exit 0" 1 2 1546 trap "echo ''; echo ''; echo 'Aborted.'; cleanup; exit 0" 1 2 15 41 47 42 48 seed=$(($RANDOM * $$)) … … 53 59 54 60 for file in /tmp/zzuf-text-$$ /tmp/zzuf-zero-$$ /tmp/zzuf-random-$$; do 55 for r in 0.0 0.00001 0.0001 0.001 0.01 0.1 1.0 10.0; do61 for r in 0.000000 0.00001 0.0001 0.001 0.01 0.1 1.0 10.0; do 56 62 echo "Testing zzuf on $file, ratio $r:" 57 63 OK=1 58 64 MD5="" 59 65 check $seed $r "cat $file" "cat" 60 # don't do grep, it adds a newline at EOF! 61 # check $seed $r "grep -- -a \\'\\' $file" "grep -a" 66 check $seed $r "cat < $file" "cat stdin" 67 # We don't include grep in the testsuite because it puts a newline 68 # at the end of its input if it was not there initially. 69 #check $seed $r "grep -- -a \\'\\' $file" "grep -a" 62 70 check $seed $r "sed n $file" "sed n" 63 71 check $seed $r "dd bs=65536 if=$file" "dd(bs=65536)" … … 75 83 done 76 84 done 77 cleanup78 85 79 86 if [ "$FAILED" != 0 ]; then 80 echo "$FAILED tests failed out of $TESTED. Files preserved:" 81 echo " /tmp/zzuf-zero-$$" 82 echo " /tmp/zzuf-random-$$" 83 echo " /tmp/zzuf-text-$$" 87 echo "$FAILED tests failed out of $TESTED." 88 cleanup 84 89 exit 1 85 90 fi 86 91 echo "All $TESTED tests OK." 92 93 cleanup 87 94 exit 0 88 95
Note: See TracChangeset
for help on using the changeset viewer.