Changeset 2531

Show
Ignore:
Timestamp:
07/16/08 11:51:53 (3 months ago)
Author:
sam
Message:
  • testsuite.h: do not test for grep -a if the option is unknown.
Files:
1 modified

Legend:

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

    r2529 r2531  
    4444        ZZOPTS="-s $seed -r $r" 
    4545        case $file in 
    46           *text*) ZZOPTS="$ZZOPTS -P '\n'" ;; 
     46          *text*) ZZOPTS="$ZZOPTS -P '\\n' -R '\\000'" ;; 
    4747        esac 
    4848        echo "*** file $file, ratio $r ***" 
     
    7676            check "$ZZOPTS" "tail -n 9999 $file" "tail -n 9999" 
    7777            check "$ZZOPTS" "tail -n +1 $file" "tail -n +1" 
    78             check "$ZZOPTS" "grep -a '' $file" "grep -a ''" 
     78            if grep -a '' /dev/null >/dev/null 2>&1; then 
     79                check "$ZZOPTS" "grep -a '' $file" "grep -a ''" 
     80            fi 
    7981            check "$ZZOPTS" "sed -e n $file" "sed -e n" 
    8082            #check "$ZZOPTS" "cut -b1- $file" "cut -b1-" 
     
    8284            check "$ZZOPTS" "-i tail -n 9999 < $file" "|tail -n 9999" 
    8385            check "$ZZOPTS" "-i tail -n +1 < $file" "|tail -n +1" 
    84             check "$ZZOPTS" "-i grep -a '' < $file" "|grep -a ''" 
     86            if grep -a '' /dev/null >/dev/null 2>&1; then 
     87                check "$ZZOPTS" "-i grep -a '' < $file" "|grep -a ''" 
     88            fi 
    8589            check "$ZZOPTS" "-i sed -e n < $file" "|sed -e n" 
    8690            #check "$ZZOPTS" "-i cut -b1- < $file" "|cut -b1-"