#!/usr/bin/env bash
# -*- shell-script -*-
t=${0##*/}; TEST_NAME=${t:5}   # basename $0 with 'test-' stripped off
# Test debugger long options.

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

# Doesn't work when not built from the source directory.
[[ "$top_builddir" != "$top_srcdir" ]] && exit 77

(cd $srcdir && $SH ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)

cat ${TEST_FILE} | sed -e "s|The default directory is: .*|The default directory is: |" | sed -e "s|(bashdb_cmd.*:1):|(bashdb_cmd_123:1):|" >${TEST_FILTERED_FILE}

check_output $TEST_FILTERED_FILE $RIGHT_FILE
rc=$?
exit $rc
