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
# 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
# Do a single test with message one's body of size sz.
do_one_test_A () {
SZ=$1
- makembox_A "$MH_TEST_DIR/eom-align.mbox" $STDIO_BUFSZ
+ makembox_A "$MH_TEST_DIR/eom-align.mbox" $SZ
$VALGRIND inc -silent -file "$MH_TEST_DIR/eom-align.mbox"
# We know the messages should be 11 and 12 in inbox
# Now get the bodies back out.
# Do a test type B
do_one_test_B () {
SZ=$1
- makembox_B "$MH_TEST_DIR/eom-align.mbox" $STDIO_BUFSZ
+ makembox_B "$MH_TEST_DIR/eom-align.mbox" $SZ
$VALGRIND inc -silent -file "$MH_TEST_DIR/eom-align.mbox"
# We know the message should be 11 in the inbox
body1="$MH_TEST_DIR/eom-align.inbox.body1"
# 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
- progress_update $i $START $FINISH
+ printf ' %s' $i
do_one_test_A $i
do_one_test_B $i
i=`expr $i + 1`
done
-progress_done
+printf '\n'
test ${failed:-0} -eq 0 && \
rm "$MH_TEST_DIR/eom-align.mbox" "$MH_TEST_DIR/eom-align.mbox.body"