#! /bin/sh
# $Id: setenv.t,v 1.2 2000/08/11 05:29:43 rra Exp $
#
# Wrapper around the setenv test suite to set a resource limit low enough
# that two strings over 50KB can't both be allocated, allowing the memory
# allocation failure code in setenv to be exercised.  Done with this
# wrapper because ulimit is more easily portable than the corresponding C
# code.

# Find where the test suite is.
setenv=setenv.tr
for file in ./setenv.tr lib/setenv.tr tests/lib/setenv.tr ; do
    [ -x $file ] && setenv=$file
done

ulimit -d 90
exec $setenv
