#!/bin/bash
set -e
set -x

pkg="cif-tools"
testfile="/usr/share/doc/libcifpp-dev/examples/1cbs.cif.gz"

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

# simply run a validate on 1cbs, should exit without a problem
cif-validate ${testfile}
