#!/bin/sh
# autopkgtest check: Run simple test data through Roary 
# Author: Sascha Steinbiss <satta@debian.org>
set -e

pkg=roary

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

cd $AUTOPKGTEST_TMP

cp -a /usr/share/doc/${pkg}/examples/* .
cp -a /usr/share/doc/${pkg}/expected_files.out .

roary -f out *.gff

[ -d out ]

find out | LC_ALL=C sort | diff - expected_files.out
