#!/usr/bin/env bash

set -euo pipefail;

CMD='test';

if [[ "x${1}" == 'xcover' ]];
then
    CMD='cover';
elif [[ "x${1}" == 'xcover_codecov' ]];
then
    CMD='cover -test -report codecov';
fi

# Add the "t" directory to @INC so we can use the test helpers
PERL5LIB=t exec dzil $CMD;