X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fexpressions%2Fexpressions.sh;h=b4850d7ebdc07eaac3b4123edaed7c6bd6662962;hb=4f979f136b4ad72bbb79aa801f33b183f0f44166;hp=4cac5571bd75550b98afa771c7425a33e9530306;hpb=4848cff524922cc77ed21662406807471e96a68e;p=pspp-builds.git diff --git a/tests/expressions/expressions.sh b/tests/expressions/expressions.sh index 4cac5571..b4850d7e 100755 --- a/tests/expressions/expressions.sh +++ b/tests/expressions/expressions.sh @@ -9,13 +9,14 @@ here=`pwd`; # ensure that top_srcdir is absolute cd $top_srcdir; top_srcdir=`pwd` -export STAT_CONFIG_PATH=$top_srcdir/config +STAT_CONFIG_PATH=$top_srcdir/config +export STAT_CONFIG_PATH cleanup() { + cd / rm -rf $TEMPDIR - : } @@ -665,6 +666,7 @@ number("123", f3.0) => 123.00 number(" 123", f3.0) => 12.00 number("123", f3.1) => 12.30 number(" ", f3.1) => sysmis +number("123", a8) => error number("123", cca1.2) => error # CCA is not an input format ltrim(' abc') => "abc" @@ -1296,14 +1298,14 @@ set mxerr 1000.' > $TEMPDIR/expr-opt.stat sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-opt.stat \ -e 's#^\(\(.*\); \)*\(.*\) => .*$#DEBUG EVALUATE\2/\3.#' if [ $? -ne 0 ] ; then no_result ; fi -cp $TEMPDIR/expr-opt.stat ~/foo activity="run optimizing program" $SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii \ $TEMPDIR/expr-opt.stat >$TEMPDIR/expr-opt.err 2> $TEMPDIR/expr-opt.out activity="compare optimizing output" -diff -B -b $TEMPDIR/expr-list $TEMPDIR/expr-opt.out +perl -pi -e 's/^\s*$//g' $TEMPDIR/expr-list $TEMPDIR/expr-opt.out +diff -b $TEMPDIR/expr-list $TEMPDIR/expr-opt.out if [ $? -ne 0 ] ; then fail ; fi activity="create non-optimizing input" @@ -1318,7 +1320,8 @@ $SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii \ $TEMPDIR/expr-noopt.stat >$TEMPDIR/expr-noopt.err 2> $TEMPDIR/expr-noopt.out activity="compare non-optimizing output" -diff -B -b $TEMPDIR/expr-list $TEMPDIR/expr-noopt.out +perl -pi -e 's/^\s*$//g' $TEMPDIR/expr-list $TEMPDIR/expr-noopt.out +diff -b $TEMPDIR/expr-list $TEMPDIR/expr-noopt.out if [ $? -ne 0 ] ; then fail ; fi activity="create optimizing postfix input"