#!/bin/sh -e

pkg=adapterremoval
if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd "$AUTOPKGTEST_TMP"
cp -a /usr/share/doc/adapterremoval/examples/* .
gunzip -r *

# Upstream ships a Makefile that runs all documented example commands
make EXE=adapterremoval3

test -s output_single.r1.fastq.gz
test -s output_paired.r1.fastq.gz
test -s output_paired.r2.fastq.gz
test -s output_merged.merged.fastq.gz
test -s output_demux.json
