#!/bin/bash
set -e

pkg=paraclu

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 -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}"

cd "${AUTOPKGTEST_TMP}"

paraclu 10 input.fa > output
if [ $(dpkg-architecture -qDEB_BUILD_ARCH) = "amd64" ]
then
	echo "a12f21cef993174184c7061b95046808  output" >> checksums
    md5sum --check checksums
	echo "Expected output and generated output are same: PASS Test 1"
else
	[ -s "output" ] || exit 1
	echo "PASS Test"
fi
