#!/bin/sh -e

oname=xml2
pkg=r-cran-`echo $oname | tr [A-Z] [a-z]`

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