# 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
- :
}
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"
SYSMIS(1 + $SYSMIS) => true
# FIXME: out-of-range and nearly out-of-range values on dates
+
+# Tests correctness of generic optimizations in optimize_tree().
+(X = 10.00); x + 0 => 10.00
+(X = -3.00); x - 0 => -3.00
+(X = 5.00); 0 + x => 5.00
+(X = 10.00); x * 1 => 10.00
+(X = -3.00); 1 * x => -3.00
+(X = 5.00); x / 1 => 5.00
+(X = 10.00); 0 * x => 0.00
+(X = -3.00); x * 0 => 0.00
+(X = 5.00); 0 / x => 0.00
+(X = 5.00); mod(0, x) => 0.00
+(X = 5.00); x ** 1 => 5.00
+(X = 5.00); x ** 2 => 25.00
EOF
if [ $? -ne 0 ] ; then no_result ; fi
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 \