#!/bin/sh
#
# This is a simple script that tests autoproject
#
# install as: /usr/lib/debian-test/tests/autoproject
#
# You can run this script with the command
#       sh debian/tests
# After installation, you can run it with the commands
#       /usr/lib/debian-test/tests/autoproject
# or
#       debian-test -v autoproject
# see debian-test(1)

. ${DEBIANTEST_LIB:-/usr/lib/debian-test/lib}/functions.sh

TMP=/tmp/autoproject-test.$$
test -e $TMP && rm -rf $TMP
mkdir $TMP
cd $TMP
trap "rm -rf $TMP" EXIT

test1(){

    set -e

    # remember where the skeletons are buried
    srcdir=${srcdir:-.}
    # aclocal looks in .. and ../.. for some standard files, so we start
    # deeper than that
    rm -rf testplain
    mkdir testplain; cd testplain
    mkdir deeper; cd deeper

    autoproject -d  "washes windows" -L../../../$srcdir/lib -i cli squeegee 2>/dev/null <<EOF





y

y






EOF
    cd squeegee
    make
    make distcheck

    return $?
}

runtest "project not using a parser generator" test1
# extend as necessary...
