#! /bin/sh # -*- Mode: Shell-script -*- # ---------------------------------------------------------------------- # expr.test --- [= % name (sprintf "%%-18s" "%s") =] expression # # Time-stamp: "2007-07-04 11:29:40 bkorb" # Author: Bruce Korb # ## ## This file is part of AutoGen. ## AutoGen copyright (c) 1992-2007 by Bruce Korb - all rights reserved ## ## AutoGen 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. ## ## AutoGen 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 this program. If not, see . ## # $Id: expr.test,v 4.6 2007/07/04 20:51:13 bkorb Exp $ # ---------------------------------------------------------------------- . ./defs # # # # # # # TEMPLATE & DEFINITIONS FILES # # # # # # # # # # # We construct this by pulling down the sources from the # AutoGen source directory. We will also copy out the same # commands as are used there. ${top_srcdir} is a full path. mkdir ${testname}.d cp ${top_srcdir}/agen5/snarf.tpl ${top_srcdir}/agen5/exp*.c \ ${top_srcdir}/agen5/func*.c ${testname}.d/. exec 3> ${testname}.d/${testname}.sh ( cat <<- _EOF_ AGexe=${AGexe} GDexe=${GDexe} CLexe=${CLexe} _EOF_ sed -n '/ expr.ini /,/date > stamp-exprini/p' \ ${top_srcdir}/agen5/bootstrap.dir | \ sed '1d;$d' ) > ${testname}.d/${testname}.sh # Remove the lines that *will* be different, always... # ( cd ${testname}.d ; srcdir=. ${SHELL} -x ./${testname}.sh ) sed '/DO NOT EDIT/,/and the template/d' ${testname}.d/expr.ini > expr.res sed '/DO NOT EDIT/,/and the template/d' ${top_srcdir}/agen5/expr.ini \ > expr.base test -s expr.res || \ failure "${testname} test produced no output" cmp expr.base expr.res || \ failure "`diff -c expr.base expr.res`" cleanup ## Local Variables: ## Mode: shell-script ## indent-tabs-mode: nil ## sh-indentation: 2 ## End: # end of expr.test