#!/bin/sh -e

export LC_ALL=C.UTF-8

debname=r-cran-assertive.base

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
    AUTOPKGTEST_TMP=`mktemp -d /tmp/${debname}-test.XXXXXX`
    trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi

cp -a * $AUTOPKGTEST_TMP
cd $AUTOPKGTEST_TMP

cd tests
for testfile in *.R; do
    echo "BEGIN TEST $testfile"
    R --no-save < ${testfile}
done
