#!/bin/sh
# Build and execute the upstream's testsuite for FreeImagePlus against the
# installed  binaries.

set -e

# Fetch the upstream testsuite.
cp -a Wrapper/FreeImagePlus/test "$AUTOPKGTEST_TMP"

# Build using the installed FreeImagePlus package.
cd "$AUTOPKGTEST_TMP/test" && \
g++ *.cpp -lfreeimageplus -lfreeimage -o test-freeimageplus && \
./test-freeimageplus
