# $Id: 340-ezmlm-get 115 2004-12-22 04:59:00Z bruce $

#############
# ezmlm-get #
#############

if [ $SECT -le 3 ]; then

  prompt "ezmlm-get (2/2):      "

# index1/get1/thread1 should bounce and will not be looked for
# index2 ... should be in DIG@HOST's inbox
# get3 - r format to DIG@HST
# get4 - n
# get5 - v
# get6 - x

# well - just a consistency check
  ${GREP} "index1" ${DIGDIR}/new/* >/dev/null 2>&1 && \
	{ ${ECHO} "index1 found in wrong mailbox"; exit 100; }

# now check that they've been delivered. We don't check the formats,
# as this would be quite involved.
  ${GREP} "index2" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "index2 failed to return"; exit 100; }
  ${GREP} "get2" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "get2 failed to return"; exit 100; }
  ${GREP} "get3" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "get3 format 'r' failed to return"; exit 100; }
  ${GREP} "get4" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "get3 format 'n' failed to return"; exit 100; }
  ${GREP} "get5" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "get3 format 'v' failed to return"; exit 100; }
  ${GREP} "get6" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "get3 format 'x' failed to return"; exit 100; }

  ${GREP} "dig1" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "dig1 from manager wasn't delivered"; exit 100; }
  ${GREP} "dig2" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "dig2 from editor wasn't delivered"; exit 100; }
  ${GREP} "dig3" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "dig3 from command line wasn't delivered"; exit 100; }
  ${GREP} "dig4" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "dig4 format 'r' wasn't delivered"; exit 100; }
  ${GREP} "dig5" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "dig5 format 'n' wasn't delivered"; exit 100; }
  ${GREP} "dig6" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "dig6 format 'x' wasn't delivered"; exit 100; }
  ${GREP} "dig6" ${DIGDIR}/new/* >/dev/null 2>&1 || \
	{ ${ECHO} "dig6 format 'v' wasn't delivered"; exit 100; }

  ${ECHO} "OK"

fi
