#!/bin/sh
# $Id: t-idb-0.sh,v 1.17 2006/10/05 01:42:46 ca Exp $
# Copyright (c) 2003-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.
#
# ------------------------------------------------------------
# Description:
# Test script for t-idb-0 and t-idb-1
# ------------------------------------------------------------
#
test -s stop && exit 1
#
SD=`dirname $0`
. ${SD}/../chkmts/common.sh
ERRS=0
# created by binary
# test -d ${IBDBDIR} || mkdir ${IBDBDIR}
# XREF Must be the same as in t-idb-0.c
rm -f ${IBDBDIR}/${IBDB}
for i in 1 2 3 4 8 9 10 11 12 16 100 ""
do
for opt in "" "p" "a" "R" "ap" "aR" "pR" "apR"
do
OPT="-1"
if test X"$i" != "X"
then
OPT="${OPT} -i $i"
fi
if test X"$opt" != "X"
then
OPT="${OPT} -$opt"
fi
if ${VALGRIND} ./t-idb-0 ${OPT}
then
:
else
ERRS=`expr ${ERRS} + 1 `
echo "$0: failed for ${OPT}"
test X"${MTA_STOPONERROR}" != X && exit 1
fi
done
# XREF Must be the same as in t-idb-0.c
rm -f ${IBDBDIR}/${IBDB}
done
# XREF Must be the same as in t-idb-0.c
rm -f ${IBDBDIR}/${IBDB}
if ${VALGRIND} ./t-idb-1
then
:
else
ERRS=`expr ${ERRS} + 1 `
fi
exit ${ERRS}
syntax highlighted by Code2HTML, v. 0.9.1