#!/bin/sh -e

pkg=parsinsert

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}/test_data/* .
gunzip -r *

parsinsert -d0 -c80 -n1 set1000.fasta -m lanemask.txt -x rdp.taxonomy \
	-l set1000.log -o set1000.results -t core_rdp.ntree \
	-s core_rdp.fasta

cmp -s right_results set1000.results || {
  echo "incorrect result"
  exit 1
  }

