#!/bin/sh
# $Id: t-verpify-0.sh,v 1.1 2005/12/14 01:05:23 ca Exp $
# Copyright (c) 2005 Sendmail, Inc. and its suppliers.
#	All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
test -s stop && exit 1
#
IN=t_verpify_0.in
OK=t_verpify_0.ok
OUT=t_verpify_0.out
ERR=t_verpify_0.err
ERRORS=0
PRG=./t-verpify

while read A B C
do
  # echo "M:${A} R:${B} E:${C}"
  if ${PRG} ${A} ${B} > ${OUT}
  then
    :
  else
    ERRORS=`expr ${ERRORS} + 1 `
    break
  fi

  echo ${C} > ${OK}
  if diff ${OK} ${OUT}
  then
    :
  else
    ERRORS=`expr ${ERRORS} + 1 `
    break
  fi
done <<EOF
<a@b.c> <d@e.f> <a+d=e.f@b.c>
<a1@b1.c1> <d1@e1.f1> <a1+d1=e1.f1@b1.c1>
<a2-mail2@b2.c2> <d2-rcpt2@e2.f2> <a2-mail2+d2-rcpt2=e2.f2@b2.c2>
EOF

if test ${ERRORS} -eq 0
then
  rm -f ${IN} ${OK} ${OUT} ${ERR}
fi

exit ${ERRORS}


syntax highlighted by Code2HTML, v. 0.9.1