#!/usr/bin/env bash
t=${0##*/}; TEST_NAME=${t:5}   # basename $0 with 'test-' stripped off

[ -z "$builddir" ] && builddir=$PWD
. ${builddir}/check-common.sh

tests=${@:-"subshell1 subshell2 subshell3"}
script=subshell
for TEST_NAME in $tests; do
    echo "checking $TEST_NAME..."
    run_test_check $script $SUBTEST
    rc=$?
    (( $rc != 0 )) && exit $rc
done

# Return code tells testing mechanism whether passed or not.
exit 0
