#!/bin/sh -e

pkg=proteinortho

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}"

mkdir test
cp -a /usr/share/doc/${pkg}/examples/* test
gunzip -r *

proteinortho -project=test -synteny -singles test/*.faa
./test/chk_test.pl test.proteinortho.tsv
./test/chk_test.pl test.poff.tsv
echo "Test okay"
