From 7472b8866ffaee51e7989c6316bdbd1ea1153492 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Sun, 24 Sep 2017 13:49:32 +0100 Subject: [PATCH] inc/test-eom-align: Fix MMDF-mbox `A' size calculation. The `...LINESZ' variables are number of bytes, not number of lines, so MMDF's is now 5 rather than 1. And the MMDF magic string tops and tails each email so needs to be subtracted twice, not once like From_'s. Fixes 8699f1cc. --- test/inc/test-eom-align | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/inc/test-eom-align b/test/inc/test-eom-align index a75928f1..d4febfce 100755 --- a/test/inc/test-eom-align +++ b/test/inc/test-eom-align @@ -53,7 +53,7 @@ fi STDIO_BUFSZ=16384 FROMLINESZ=`wc -c < "$FROMLINE"` -MMDFDELIMLINESZ=1 +MMDFDELIMLINESZ=5 HDRSZ=`wc -c < "$HDR"` # makembox_A mboxname sz @@ -77,11 +77,13 @@ makembox_A () { } # makemmdf_A mmdfboxname sz +# The first email in $MBOX will be sz bytes long, including its MMDF +# magic strings that top and tail it. makemmdf_A () { MBOX="$1" SZ=$2 - arith_eval $SZ - $HDRSZ - $MMDFDELIMLINESZ - 1; WANTSZ=$arith_val + arith_eval $SZ - $MMDFDELIMLINESZ - $HDRSZ - 1 - $MMDFDELIMLINESZ; WANTSZ=$arith_val dd if="$FILLER" of="$MBOX.body" bs="$WANTSZ" count=1 2>/dev/null echo >> "$MBOX.body" #### The trailing $MMDF_DELIM's allows $MBOX to exactly match a file -- 2.56.0