#!/bin/sh -e

pkg=r-cran-ggplot2
if [ "$ADTTMP" = "" ] ; then
  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd $ADTTMP
cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
find . -name "*.gz" -exec gunzip \{\} \;
LC_ALL=C R --no-save < testthat.R
rm -fr $ADTTMP/*
