]> diplodocus.org Git - nmh/blobdiff - test/inc/test-eom-align
Moved free(cp) to right after last (and only) use of cp. The statement
[nmh] / test / inc / test-eom-align
index c6e6225fb202ac7b50789ece4f87155296718b4f..aa470c36b1d1bff0e5a8095737a662c653f6408c 100755 (executable)
@@ -38,7 +38,7 @@ FILLER="$THISDIR/filler.txt"
 FROMLINE="$THISDIR/fromline.txt"
 HDR="$THISDIR/msgheader.txt"
 
 FROMLINE="$THISDIR/fromline.txt"
 HDR="$THISDIR/msgheader.txt"
 
-if grep -q From "$FILLER"; then
+if grep From "$FILLER" >/dev/null; then
    echo "Somebody's messed with $FILLER -- it must not contain"
    echo "anything that might look like a message delimiter!"
    exit 1
    echo "Somebody's messed with $FILLER -- it must not contain"
    echo "anything that might look like a message delimiter!"
    exit 1
@@ -51,8 +51,8 @@ fi
 # bigger as well.
 STDIO_BUFSZ=16384
 
 # bigger as well.
 STDIO_BUFSZ=16384
 
-FROMLINESZ=`wc -c "$FROMLINE" | cut -d ' ' -f 1`
-HDRSZ=`wc -c "$HDR" | cut -d ' ' -f 1`
+FROMLINESZ=`wc -c < "$FROMLINE"`
+HDRSZ=`wc -c < "$HDR"`
 
 # makembox_A mboxname sz
 # Assemble a mailbox into file mboxname, with two messages, such
 
 # makembox_A mboxname sz
 # Assemble a mailbox into file mboxname, with two messages, such
@@ -126,7 +126,7 @@ do_one_test_B () {
 # buffer size or to body size equal to buffer size.
 arith_eval $STDIO_BUFSZ - 16; START=$arith_val
 arith_eval $STDIO_BUFSZ + $HDRSZ + $FROMLINESZ + 32; FINISH=$arith_val
 # buffer size or to body size equal to buffer size.
 arith_eval $STDIO_BUFSZ - 16; START=$arith_val
 arith_eval $STDIO_BUFSZ + $HDRSZ + $FROMLINESZ + 32; FINISH=$arith_val
-echo \
+[ -t 1 ]  &&  echo \
 "Testing inc of files with various alignments of eom marker with buffer size..."
 i="$START"
 while test $i -le $FINISH; do
 "Testing inc of files with various alignments of eom marker with buffer size..."
 i="$START"
 while test $i -le $FINISH; do