#!/bin/sh -e

pkg=seqprep
if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi
cd $AUTOPKGTEST_TMP
cp -a /usr/share/doc/${pkg}/examples/* .
# sed -i 's#../SeqPrep#/usr/bin/seqprep#' RUNTEST.sh
mkdir -p out info && \
bash -xc 'gzcat(){ zcat "$@" ; } ; . RUNTEST.sh'
if [ `cat info/pe_*.txt | md5sum | cut -b -10` = 8bc8e0787e ] ; then
    echo "Test OK"
else
    echo "Test failed"
    exit 1
fi
