#!/bin/sh ###################################################### # # Test m_getfld() with various parts of messages # falling on buffer boundaries # ###################################################### set -e if test -z "${MH_OBJ_DIR}"; then srcdir=`dirname "$0"`/../.. MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR fi . "$MH_OBJ_DIR/test/common.sh" setup_test expected="$MH_TEST_DIR/$$.expected" actual="$MH_TEST_DIR/$$.actual" # check a boundary condition in m_getfld(): its internal message # buffer holds exactly up to the end of a header field body in a # message part msgfile=`mhpath new` msgnum=`basename $msgfile` cat >"$msgfile" <"$expected" <"$actual" 2>&1 check "$expected" "$actual" : check number 1 # check a boundary condition in m_getfld(): its internal message # buffer holds exactly up to the end of a header field name in a # message part msgfile=`mhpath new` msgnum=`basename $msgfile` cat >"$msgfile" <"$expected" <"$actual" 2>&1 check "$expected" "$actual" : check number 2 # check a boundary condition in m_getfld(): its internal message # buffer holds exactly up to the end of a message part boundary msgfile=`mhpath new` msgnum=`basename $msgfile` cat >"$msgfile" <"$expected" <"$actual" 2>&1 check "$expected" "$actual" : check number 3 exit $failed