#! /bin/sh

############################################################################
# Copyright 2005, 2006 Niels Lohmann, Christian Gierds, Dennis Reinert     #
#                                                                          #
# This file is part of BPEL2oWFN.                                          #
#                                                                          #
# BPEL2oWFN 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 2 of the License, or (at your   #
# option) any later version.                                               #
#                                                                          #
# BPEL2oWFN 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 BPEL2oWFN; if not, write to the Free Software Foundation, Inc., 51  #
# Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.                     #
############################################################################

# File last changed $Date: 2006/01/15 18:18:23 $ by $Author: nlohmann $.
# Version $Revision: 1.3 $

bpel2owfn --file $testdir/loan.bpel
result1=$?

bpel2owfn --file $testdir/purchase.bpel -x > purchase.xml
result2=$?

bpel2owfn --file $testdir/shipping.bpel -a > shipping.ast
result3=$?

if test \( $result1 -eq 0 -a $result2 -eq 0 -a $result3 -eq 0 \) -a \
	\( -e purchase.xml -a -e shipping.ast \)
then
  result=0
else
  result=1
fi

exit $result
