#!/bin/sh
set -e -u
[ -d "$ADTTMP/" ] # sanity check
cp -a test "$ADTTMP/"
cd "$ADTTMP"
mkdir -p home mock src/shell
ln -sf /bin/false mock/scp
ln -sf $(which task) src/task
export HOME="$PWD/home/"
export PATH="$PWD/mock/:$PATH"
export TASKDATA="$HOME/taskrc"
export TASKRC="$HOME/taskdata"
touch "$TASKRC"
cd test/
rm -f version.t # checks git
rm -f bash_completion.t # not in sandbox
rm -f tw-1379.t # color themes not in test sandbox
rm -f tw-1643.t # interactive
rm -f tw-1718.t # upstream bug?
chmod a+x run_all
./run_all --verbose
if ls -d "$TASKDATA" 2>/dev/null; then
    exit 1
fi

# vim:ts=4 sw=4 et
