#!/bin/sh

# Copyright (C) 2004, 2008 Simon Josefsson.
#
# This file is part of Autobuild.
#
# Autobuild 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.
#
# Autobuild 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 Autobuild.  If not, see <http://www.gnu.org/licenses/>.

TMP="tmp.$$"
srcdir=${srcdir:-.}

filename=`(cd $srcdir/..; perl ./autobuild --dry-run --verbose examples/libidn.txt) 2> $TMP`
err=$?

if test "$err" != "0"; then
    echo Running autobuild failed: $err
    rm -f $TMP
    exit 1
fi

if cmp $TMP $srcdir/../examples/libidn.expect; then
    :
else
    echo File comparison failed
    rm -f $TMP
    exit 1
fi

rm -f $TMP
exit 0
