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 export STAT_CONFIG_PATH=$top_srcdir/config
48 activity="create program"
49 cat > $TEMPDIR/vectors.stat <<EOF
50 DATA LIST /N1 TO N5 1-5.
51 MISSING VALUES N1 TO N5 (3 THRU 5, 1).
60 COMPUTE X(I)=N(I) + 1.
67 if [ $? -ne 0 ] ; then no_result ; fi
69 activity="run program"
70 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/vectors.stat > $TEMPDIR/vectors.err 2> $TEMPDIR/vectors.out
71 if [ $? -ne 0 ] ; then fail ; fi
73 activity="compare results"
74 diff -b -B $TEMPDIR/pspp.list - <<EOF
75 1.1 DATA LIST. Reading 1 record from the command file.
76 +--------+------+-------+------+
77 |Variable|Record|Columns|Format|
78 #========#======#=======#======#
84 +--------+------+-------+------+
86 N1 N2 N3 N4 N5 X1 X2 X3 X4 X5 I
87 -- -- -- -- -- -- -- -- -- -- --
89 6 7 8 9 . 7 8 9 10 . 5
92 if [ $? -ne 0 ] ; then no_result ; fi
95 if [ $? -ne 0 ] ; then fail ; fi