#!/bin/sh -e

# This test is superfluous since data file not DFSG free,
# see https://lists.debian.org/debian-r/2021/02/msg00001.html
# It is provided to not break the automatic debian/tests/control file
# but has no special meaning
#
# To make it work it might be considered to download the said test file

exit 0

debname=r-cran-rsdmx

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
    AUTOPKGTEST_TMP=`mktemp -d /tmp/${debname}-test.XXXXXX`
    trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi
cd $AUTOPKGTEST_TMP
cp -a /usr/share/doc/$debname/tests $AUTOPKGTEST_TMP
gunzip -r *
cd tests
for testfile in *.R; do
    echo "BEGIN TEST $testfile"
    LC_ALL=C.UTF-8 R --no-save < $testfile
done

