#!/bin/bash
set -e

pkg=quorum

export LC_ALL=C.UTF-8
if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi

cp  /usr/share/doc/filtlong/test/* "${AUTOPKGTEST_TMP}"

cd "${AUTOPKGTEST_TMP}"

gunzip -r *

quorum -s 50M test_reference_1.fastq test_reference_2.fastq -q 30
[ -s "quorum_corrected.fa" ] && [ -s "quorum_corrected.log" ] || exit 1
echo "PASS Test"

