#!/bin/sh -e

pkg=r-cran-reshape2
if [ "$ADTTMP" = "" ] ; then
  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd $ADTTMP
cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
gunzip -r *
R --no-save < testthat.R
rm -rf $ADTTMP/*
