#!/bin/sh -e

pkg=r-cran-truncnorm
if [ "$ADTTMP" = "" ] ; then
  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd $ADTTMP
cp /usr/share/doc/${pkg}/tests/* $ADTTMP
gunzip *
for runtest in `ls *.R` ; do
    R --no-save < $runtest
done
rm -f $ADTTMP/*
