2019-12-30 20:55:55 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ -n "${SKIP_DOCTESTS}" ] ; then
|
|
|
|
echo "Skipping doctests"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! command -v doctest >/dev/null ; then
|
|
|
|
tempdir="$(mktemp -d)"
|
|
|
|
(
|
|
|
|
cd "${tempdir}"
|
|
|
|
cabal install --installdir="${tempdir}" doctest
|
|
|
|
)
|
|
|
|
export PATH="${tempdir}:$PATH"
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
2020-01-04 16:52:21 +00:00
|
|
|
cabal exec doctest -- -ihpath-filepath/src -XOverloadedStrings System.Posix.FilePath
|