#!/bin/sh

set -e
set -x

test -d "$ADTTMP"
test "$(echo "$ADTTMP"/*)" = "$ADTTMP/*"

# this could be anything, it's just some random file to use as the "secret"
echo "it's a secret to everybody!" > "$ADTTMP"/libtool

# the test script is designed to be used uninstalled
ln -s "$(which gfsplit)" "$ADTTMP"/gfsplit
ln -s "$(which gfcombine)" "$ADTTMP"/gfcombine
install tests/test_gfsplit_gfcombine.sh "$ADTTMP"/test_gfsplit_gfcombine.sh

cd "$ADTTMP"
exec sh -x ./test_gfsplit_gfcombine.sh
