3 # This program tests use of vectors in expressions.
5 TEMPDIR=/tmp/pspp-tst-$$
9 # ensure that top_srcdir is absolute
10 cd $top_srcdir; top_srcdir=`pwd`
12 STAT_CONFIG_PATH=$top_srcdir/config
13 export STAT_CONFIG_PATH
50 activity="create program"
51 cat > $TEMPDIR/vectors.stat <<EOF
52 DATA LIST /N1 TO N5 1-5.
53 MISSING VALUES N1 TO N5 (3 THRU 5, 1).
62 COMPUTE X(I)=N(I) + 1.
69 if [ $? -ne 0 ] ; then no_result ; fi
71 activity="run program"
72 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/vectors.stat > $TEMPDIR/vectors.err 2> $TEMPDIR/vectors.out
73 if [ $? -ne 0 ] ; then fail ; fi
75 activity="compare results"
76 perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
77 diff -b $TEMPDIR/pspp.list - <<EOF | perl -e 's/^\s*$//g'
78 1.1 DATA LIST. Reading 1 record from the command file.
79 +--------+------+-------+------+
80 |Variable|Record|Columns|Format|
81 #========#======#=======#======#
87 +--------+------+-------+------+
89 N1 N2 N3 N4 N5 X1 X2 X3 X4 X5 I
90 -- -- -- -- -- -- -- -- -- -- --
92 6 7 8 9 . 7 8 9 10 . 5
95 if [ $? -ne 0 ] ; then no_result ; fi
98 if [ $? -ne 0 ] ; then fail ; fi