#! /bin/sh

# 
#
#  ProLinga-Calc
#
#  Copyright (C) 2002-2008 Xobas Software
#  All rights reserved.
#  
#  This file is part of ProLinga-Calc.
#
#  ProLinga-Calc is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  ProLinga-Calc is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with ProLinga-Calc. If not, see <http://www.gnu.org/licenses/>.
#
#  More information is available at the following addresses:
#
#  Website     : http://www.prolinga.org
#
#  Email       : prolinga-list@prolinga.org
#
#

# Make sure srcdir is an absolute path.  Supply the variable
# if it does not exist.  We want to be able to run the tests
# stand-alone!!
#
srcdir=${srcdir-.}
if test ! -d $srcdir ; then
    echo "defs: installation error" 1>&2
    exit 1
fi

#  IF the source directory is a Unix or a DOS root directory, ...
#
case "$srcdir" in
    /* | [A-Za-z]:\\*) ;;
    *) srcdir=`\cd $srcdir && pwd` ;;
esac

case "$top_builddir" in
    /* | [A-Za-z]:\\*) ;;
    *) top_builddir=`\cd ${top_builddir-..} && pwd` ;;
esac

progname=`echo "$0" | sed 's,^.*/,,'`
testname=`echo "$progname" | sed 's,-.*$,,'`
testsubdir=${testsubdir-dumps}

# User can set VERBOSE to prevent output redirection
case x$VERBOSE in
    xNO | xno | x0 | x)
        exec > /dev/null 2>&1
        ;;
esac

#rm -rf $testsubdir > /dev/null 2>&1
#mkdir $testsubdir
cd $testsubdir \
   || { echo "Cannot change into $testsubdir"; exit 1; }

echo "Testing $progname"

CMP="${CMP-cmp}"
RUNCALC="${top_builddir}/src/plcalc"

# nls related vars
#LANGUAGE=C; export LANGUAGE
#LC_ALL=C; export LC_ALL
#LANG=C; export LANG

# defs ends here
