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